Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A11y: expandable "Options" disclosure widgets not keyboard-accessible, don't expose role or state #1983

Closed
patrickhlauke opened this issue Jul 30, 2021 · 0 comments · Fixed by #2234

Comments

@patrickhlauke
Copy link
Contributor

Describe the Bug

Expand/collapse disclosure widgets (such as "Options" in the "Create new send", and "General"/"Display"/"Autofill" in Settings > Options) can't be used with a keyboard. It further doesn't expose any role, nor does it programmatically expose its state (whether the panel is expanded or collapsed).

<div class="box-header-expandable"> Options <!----><i class="fa fa-chevron-down fa-sm icon ng-star-inserted"></i> <!----> </div>

Steps To Reproduce

  1. Go to one of the screens in the popup with a disclosure widget (such as "Create new send")
  2. Try to reach the expand/collapse control with the keyboard to operate it
  3. Using a screen reader, navigate through the screen (using reading keys/browse mode) and reach the control

Expected Result

  • Disclosure wiget control can be focused using Tab, toggled with Enter or Space
  • Screen reader announces it as a button, and announces whether the related panel is expanded or collapsed

Actual Result

  • Disclosure widget trigger can't be focused/activated using keyboard
  • Screen reader does not announce it as a button, or anything interactive at all, nor does it announce the state (expanded or collapsed) or the related panel

Screenshots or Videos

'Options' disclosure widget trigger

'General'/'Display'/'Autofill' disclosure widget triggers

Environment

  • Operating system: Windows 10
  • Browser: Chrome 92
  • Build Version (go to "Settings" → "About" in the app): 1.51.1

Additional Context

Ideally, the end result should look like this

<button class="box-header-expandable" aria-expanded="false"> Options <!----><i class="fa fa-chevron-down fa-sm icon ng-star-inserted"></i> <!----> </button>

with the aria-expanded either set to false (not expanded) or true (expanded) dynamically, to reflect the state of the panel.

see https://www.w3.org/TR/wai-aria-practices-1.2/#disclosure (recommend ignoring the optional aria-controls, as it has little/no actual assistive technology support)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants