vaadin / platform

Vaadin platform 10+ is a Java web development platform based on Vaadin web components. If you don't know to which repository your bug report should be filed, use this and we'll move it to the right one.
https://vaadin.com
551 stars 78 forks source link

VirtualList list/listbox semantics #6838

Open rolfsmeds opened 1 day ago

rolfsmeds commented 1 day ago

Description

VirtualList items can be (single or multi) selected similarly to those in ListBox or Grid, and provide appropriate ARIA semantics.

Acceptance criteria

Open questions

Is the listbox ARIA role the best choice for selectable lists? The main caveat with it is that the list items (which then have role="option") are announced as plain text (essentially a concatenation of their text content), and don't expose the presence of interactive or semantically meaningful elements inside them to screen readers. (Interactive elements in them can still be used by tabbing focus to them, but their discoverability and relation to the item itself may be challenge for non-sighted users.)

An alternative would be to use the grid role instead, which provides a more suitable accessibility model for selectable items with interactive content. Downsides to this are e.g.

Comments welcome.

General criteria

Security

knoobie commented 19 hours ago

Open question

Did you check out GitHubs Issue list for a repo with administration rights? This looks intriguing like your vision. Might be worth to check out - I would hope they have added great care about a11y as well. (Haven't checked the mark-up myself... Currently on mobile)

IMG_9449

rolfsmeds commented 18 hours ago

Hey @knoobie, I checked it out and... it's a bunch of plan divs?

As for the listbox/grid dilemma, I think we might go with listbox as default when selection is enabled, but provide an API for switching to grid for use cases with lots of interactive/semantically meaningful content in the items.

knoobie commented 18 hours ago

it's a bunch of plan divs?

Oh.. that's sad to hear 🙁

knoobie commented 11 hours ago

Looks like I got trapped into believing this blog post from months ago is already in motion. https://github.blog/engineering/user-experience/how-were-building-more-inclusive-and-accessible-components-at-github/ Using listbox might be the best option to begin with - better than a huge amount of divs :)