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:
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:
The region role is used to identify document areas the author deems significant
[...]
Use sparingly! Landmark roles are intended to be used sparingly, to identify larger overall sections of the document. Using too many landmark roles can create "noise" in screen readers, making it difficult to understand the overall layout of the page.
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.
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,
regionmakes 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.