react-dropdown-select icon indicating copy to clipboard operation
react-dropdown-select copied to clipboard

Accessibility Issues

Open dbollinger opened this issue 3 years ago • 11 comments

I am testing the demo and docs pages with VoiceOver and macOS Big Sur, and finding some issues with keyboard controls and screen reader support.

  1. Navigating options should make use of aria-activedescendent to support screen readers and other assistive technologies. Without implementing aria-activedescendent, the assistive technology's cursor is not guaranteed to follow the browser's focus.
  2. Pressing the esc key does not close the popup menu
  3. When the cursor focus moves to the control, the screen reader does not read the current value(s) to the user
  4. There are also a number of issues for screen reader support in the "multi-select" variant that could probably be solved with some simple aria attributes.s
image image

I highly recommend adding an accessibility section to this library's README highlighting these issues and encouraging folks to help address them. Additional guidance about best practices for combobox style controls can be found on w3: https://www.w3.org/TR/wai-aria-practices-1.1/examples/combobox/aria1.1pattern/listbox-combo.html.

dbollinger avatar Mar 29 '21 14:03 dbollinger

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 03 '21 03:06 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 17 '21 07:08 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 30 '21 17:10 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 16 '22 03:04 stale[bot]

@sanusart I'm currently adding screen reader accessibility to our web site and noticed I'm having this issue with Mac VoiceOver as well. When group items are visually hovered, the screen reader is not announcing them. The issue can be reproduced on the demo page https://sanusart.github.io/react-dropdown-select/

Does anyone know how we can fix or work around this? I thought maybe I could listen for onHighlight events, read the title of the highlighted item, and set it as the name property for the dropdown...but it looks like there is only an onChange event and not an onHighlight event.

I tried manually setting aria-activedescendent to true through Dev Tools, but that isn't resulting in the item being read for me. Maybe that's not a valid test though.

mitchdowney avatar Apr 17 '22 01:04 mitchdowney

@sanusart hmm sorry, this might just be user error. I was of the impression elements on the page should only be navigated to with the Tab key, but I realized with Mac VoiceOver I can navigate into the dropdown menu by pressing ctrl + opt + left/right arrows.

It still seems like Tab would make more sense here since it is a menu of buttons...but maybe using ctrl + opt + left/right is a common UX for screen reader users?

mitchdowney avatar Apr 18 '22 05:04 mitchdowney

@sanusart @dbollinger I made some changes intended to improve screen reader accessibility (at least for Mac VoiceOver). These changes do not seem like a proper fix however, and I haven't tested it thoroughly across different screen readers. According to my research, it seems like using custom keyboard events are supposed to be avoided entirely to ensure proper custom dropdown accessibility...but that would require drastic re-writing, so I'm trying to at least partially improve screen reader handling (in my very limited testing).

I've also added a dropdownAriaDescription prop, since I think the user should be informed about the non-standard accessibility behavior of the dropdown.

I published these changes to npm as @podverse/react-dropdown-select in case someone else wants to use them. Any feedback would be appreciated. Thanks!

https://github.com/sanusart/react-dropdown-select/pull/232

mitchdowney avatar Apr 18 '22 08:04 mitchdowney

@mitchdowney thank you for investigation and PR draft. Will try to get to it asap. As far as I know, screen readers are not limited to tab keys only and have broad shortcuts. Saw in the docs of few of them.

sanusart avatar Apr 18 '22 12:04 sanusart

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 31 '22 06:07 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 30 '22 10:10 stale[bot]