Skip to content
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

Accordion/Collapse panel markup missing role="region" #373

Closed
c-vetter opened this issue May 23, 2024 · 2 comments
Closed

Accordion/Collapse panel markup missing role="region" #373

c-vetter opened this issue May 23, 2024 · 2 comments

Comments

@c-vetter
Copy link

The accordion and collapse panels are presented with markup like this:

<div id="hs-basic-collapse-three" class="hs-accordion-content hidden w-full overflow-hidden transition-[height] duration-300" aria-labelledby="hs-basic-heading-three">

This way, aria-labelledby is ignored. To make it work correctly, add role="region", like so:

- <div id="hs-basic-collapse-three" class="hs-accordion-content hidden w-full overflow-hidden transition-[height] duration-300" aria-labelledby="hs-basic-heading-three">
+ <div id="hs-basic-collapse-three" class="hs-accordion-content hidden w-full overflow-hidden transition-[height] duration-300" aria-labelledby="hs-basic-heading-three" role="region">

See https://www.w3.org/WAI/ARIA/apg/patterns/accordion/examples/accordion/

@jahaganiev
Copy link
Member

Hey @c-vetter - thanks for the suggestions. We will re-visit aria data attributes in future updates. Thanks!

Duplicated #365

@jahaganiev
Copy link
Member

Hey @c-vetter - our team released v2.4.0 update which includes enhancements for this case. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants