-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VirtualList selection API and list/listbox semantics #6838
Comments
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 |
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 :) |
@knoobie do you have any experience with |
I've heard about it.. even tho it's "old-ish".. just checking https://www.digitala11y.com/ok-aria-rolefeed-is-here-its-not-ready-for-prime-time/ and https://www.w3.org/WAI/ARIA/apg/patterns/feed/examples/feed/ (+ the linked issue).. it looks like it's still too "fresh" and not really adopted in the wild |
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"
Possible later enhancement
role="grid"
and item wrappers haverole="row"
role="gridcell"
space
/enter
grid
semantics, i.e.role="gridcell"
orrole="rowheader"
Open questions
Is listbox role appropriate?
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.grid
role;grid
role.Should the list root have role="feed"?
Maybe the root should have [`role="feed"`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/feed_role) to help ATs parse and announce it as an inifinite-scrolling container? (If so, it seems it can't be a list at all – instead, items should be `role="article"`)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
The text was updated successfully, but these errors were encountered: