canvas-kit icon indicating copy to clipboard operation
canvas-kit copied to clipboard

Provide better support for screen reader text in Combobox MenuItems

Open alanbsmith opened this issue 4 years ago • 0 comments

🐛 Bug Report

Because of how we get text from MenuItem elements, we ignore attributes from child elements. In some situations, this creates a diminished experience for people who use screenreaders. For example a list structured like below would announce as "Entering group GroupName (2), with 2 options."

- GroupName (2)
  - GroupItem 1
  - GroupItem 2
- GroupName (4)
  - GroupItem 1
  - GroupItem 2
  - GroupItem 3
  - GroupItem 4

While the functionality isn't broken, it's also confusing and a bit annoying. There's also no real workaround to hide the text with aria-hidden. We should find a better way to improve support here.

Example

https://codesandbox.io/s/compassionate-hamilton-3xw2p?file=/src/App.js

alanbsmith avatar Jul 19 '21 22:07 alanbsmith