[A11Y] Explicitly state aria-hidden value; hide icons from screenreaders (#3027)

* Set explicit `aria-hidden` value
* Hide icons from screen-readers
This commit is contained in:
David Wheatley 2021-08-15 20:54:50 +02:00 committed by GitHub
parent 7944358953
commit c4ba1b4fc5
3 changed files with 3 additions and 3 deletions

View File

@ -286,7 +286,7 @@ export default class UserListPage extends AdminPage {
return (
<div class="UserList-email" key={user.id()} data-email-shown="false">
<span class="UserList-emailAddress" aria-hidden onclick={() => setEmailVisibility(true)}>
<span class="UserList-emailAddress" aria-hidden="true" onclick={() => setEmailVisibility(true)}>
{user.email()}
</span>
<button

View File

@ -73,7 +73,7 @@ export default class LoadingIndicator extends Component<LoadingIndicatorAttrs> {
data-size={size}
className={completeContainerClassName}
>
<div aria-hidden className={completeClassName} {...attrs} />
<div aria-hidden="true" className={completeClassName} {...attrs} />
</div>
);
}

View File

@ -9,5 +9,5 @@ import * as Mithril from 'mithril';
export default function icon(fontClass: string, attrs: Mithril.Attributes = {}): Mithril.Vnode {
attrs.className = 'icon ' + fontClass + ' ' + (attrs.className || '');
return <i {...attrs} />;
return <i aria-hidden="true" {...attrs} />;
}