fix: remove avatars from tab order / screenreaders (#1491)

* fix: remove avatars from tab order / screenreaders

* fixup
This commit is contained in:
Nolan Lawson 2019-09-15 18:27:52 -07:00 committed by GitHub
parent 4256a790fc
commit 54db8752d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View File

@ -1,14 +1,17 @@
<a {href} <a {href}
rel="prefetch" rel="prefetch"
class="compose-box-avatar {loaded ? 'loaded' : 'not-loaded'}" class="compose-box-avatar {loaded ? 'loaded' : 'not-loaded'}"
aria-hidden={true} aria-hidden="true"
tabindex="-1"
on:click="onClick(event)" on:click="onClick(event)"
> >
<!-- the avatar is duplicated information, so hide from tab order and screenreaders -->
<Avatar account={verifyCredentials} size="small"/> <Avatar account={verifyCredentials} size="small"/>
</a> </a>
<a class="compose-box-display-name {loaded ? 'loaded' : 'not-loaded'}" <a class="compose-box-display-name {loaded ? 'loaded' : 'not-loaded'}"
{href} {href}
aria-hidden={!loaded} aria-busy={!loaded}
aria-live="off"
rel="prefetch" rel="prefetch"
on:click="onClick(event)" on:click="onClick(event)"
> >
@ -16,7 +19,9 @@
</a> </a>
<span class="compose-box-handle {loaded ? 'loaded' : 'not-loaded'}" <span class="compose-box-handle {loaded ? 'loaded' : 'not-loaded'}"
aria-hidden={!loaded} > aria-busy={!loaded}
aria-live="off"
>
{'@' + verifyCredentials.acct} {'@' + verifyCredentials.acct}
</span> </span>
<style> <style>

View File

@ -3,7 +3,9 @@
rel="prefetch" rel="prefetch"
href="/accounts/{originalAccountId}" href="/accounts/{originalAccountId}"
aria-hidden="true" aria-hidden="true"
tabindex="-1"
> >
<!-- the avatar is duplicated information, so hide from tab order and screenreaders -->
<Avatar account={originalAccount} <Avatar account={originalAccount}
isLink="true" isLink="true"
{size} /> {size} />