w3c / html-aria

ARIA in HTML
https://w3c.github.io/html-aria/
Other
179 stars 48 forks source link

Be more percise with allowed roles on the li element #351

Closed scottaohara closed 1 year ago

scottaohara commented 2 years ago

The allowed roles on list items (<li> elements) are missing a requirement that the parent ol, ul, menu role must be overwritten to allow for these specific roles that would not be valid within a role=list.

Furthermore, if a parent list element's is set to role=none, then i could see an argument that the allowed roles for a list item be expanded, and author guidance be provided that the list items need to have their roles overwritten, since without the parent role, the list items would be announced, at least in some cases - as memory serves, as disparate single item lists. Something to mull over, @stevefaulkner @patrickhlauke

Edit: tested the ul role=none with stray <li> elements within today. at least narrator, jaws and nvda with chromium / gecko browsers do not expose lists/list items for these individual items anymore. A series of 3 list items, with a role=none parent, can instead be strung together as a single text string announcement. Tldr; not as bad as my memory of how these used to behave, but still kind of odd. In this case, again, it seems worth while to open up the allowances for list items when the parent list is no longer exposed as such.