Open rolfsmeds opened 1 day 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)
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.
it's a bunch of plan divs?
Oh.. that's sad to hear 🙁
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 :)
Description
VirtualList items can be (single or multi) selected similarly to those in ListBox or Grid, and provide appropriate ARIA semantics.
Acceptance criteria
role="listbox"
) (actual focus is delegated to the first item in the list)aria-label
provider function API may be needed to provide an explicit accessible name to complex list items that may otherwise get an awkwardly long and complex name based on their text contents.aria-label
(ledby
) API in order to provide an accessible namerole="list"
and item wrappers haverole="listitem"
role="listbox"
and item wrappers haverole="option"
andaria-selected
(set tofalse
by default)aria-multiselectable="true"
aria-selected="true"
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 haverole="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.grid
role;grid
role.Comments welcome.
General criteria
[ ] APIs reviewed
[ ] Design
[ ] Performance
[ ] UX/DX tests in Alpha
[ ] Documentation: to be added to https://vaadin.com/docs/latest/components/virtual-list
[ ] How to test?
[ ] Limitations:
Security