mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 09:41:49 +08:00
[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:
parent
7944358953
commit
c4ba1b4fc5
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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} />;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user