-
Notifications
You must be signed in to change notification settings - Fork 837
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
[EuiAccordion] Should we really be using role="region"
?
#7316
Comments
role="region"
for this?role="region"
?
@cee-chen This is a great question. I didn't have a strong feeling either way, and could see both points. So in true a11y "it depends" fashion, I mocked up a simple example. It uses the same behavior as our The interesting thing was how VoiceOver treated "region" and "group" basically the same by themselves. They were both announced as "group" and neither showed up in the VO Landmarks menu. It wasn't until I applied an By using "region" and adding |
Apply worst case scenario thinking to this however - is this really an ideal scenario if a consumer has, e.g. 500 accordions/"regions" on the page? Or even in the non-worst-case scenario of the new EuiCollapsibleNav component which can have 10+ accordions in a single nav - is using |
@cee-chen and I discussed this further in a Zoom call on 27 October. We opted to default to
|
Along the same lines of "region roles should be used more carefully", I'd also like to propose switching
|
Totally not sure if I'm way off here, feel free to close this issue if so!
We're currently applying
role="region"
onto all accordion children:eui/src/components/accordion/accordion_children/accordion_children.tsx
Line 101 in fb7c397
I know that W3's WAI accordion example uses
role="region"
, but based on what I'm reading from MDN's docs I'm skeptical that this should be the case for EUI's accordions. Specifically:I really don't feel like we can say we know enough about the content in our accordions to deem them "significant", and in particularly for our collapsible nav that reuses multiple accordions which contain nothing but links,
region
makes no sense for those usages.I'd like to propose switching to a
role="group"
by default and allowing consumers to override/set this role themselves if they know their own content well enough.The text was updated successfully, but these errors were encountered: