1
0
mirror of https://github.com/flarum/core.git synced 2025-07-12 12:26:23 +02:00

[A11Y] Add aria-label to dropdown toggles (#2668)

Implement custom accessible dropdown toggle labels for forum components

Making the a11y label more specific to the specific action it performs is critical for good UX with assistive technologies.
This commit is contained in:
David Wheatley
2021-03-16 14:50:36 +00:00
committed by GitHub
parent 0e6a60bd5b
commit 0d139e6133
11 changed files with 38 additions and 2 deletions

View File

@ -17,6 +17,8 @@ export default class SessionDropdown extends Dropdown {
attrs.className = 'SessionDropdown';
attrs.buttonClassName = 'Button Button--user Button--flat';
attrs.menuClassName = 'Dropdown-menu--right';
attrs.accessibleToggleLabel = app.translator.trans('core.forum.header.session_dropdown_accessible_label');
}
view(vnode) {