-
Notifications
You must be signed in to change notification settings - Fork 113
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
[BUG] AccordionItemPanel does not have role at all #327
Comments
Good catch, I'll look at this today. |
@DraikoNick it seems the role: this.allowMultipleExpanded ? undefined : 'region', I'll ask the previous developers what the justification for this is, but I'd guess that it's based on this Aria advice,
Although "Optional" the omission of "approximately 6 panels that can be expanded" so there's a question of how fuzzy the "approximately 6" is (exactly 6 or not?), and whether we should vary behaviour based on the number of panels exceeding "approximately 6". I think RAA should apply the region regardless, but I'll consult with others before making this change. |
Whether or not the accordion panels should have region roles is dependant on the content in them. If it is significant content, like an entire section of the page, then it should have a region role. If it is something minor like some extra info on a subject, then it should not have a region role and can just be a Using 'region' only on accordions which only allow one panel open at a time is a decent base rule to make sure there aren't too many regions on the page. But ultimately, what and where landmarks should be used depends entirely on the page content. The AXE issue being picked up is that So if the |
So we think the solution is,
Thoughts? |
For people's information, we settled on this because: We definitely want users to fully control whether their accordion panels are regions or not, as accordions can be used either for extra info, or for major page sections, regardless of what other settings the accordions are using. It's much easier for us to make this configurable than for users to edit their own accordions when needed. We're defaulting to having the panels not as regions because:
|
Thanks to @synecdokey and @CalinDale this is now released as version 4.0.0. I'll close this ticket now @DraikoNick but feel free to comment when you try it. Cheers |
React Accessible Accordion documentation says that it applies appropriate role attributes (button, heading, region).
But sometimes this action does not work properly.
For example there are an examples from React Accessible Accordion examples:
example with existing role (region) in the AccordionItemPanel: click to check example of the highlighted title
<div data-accordion-component="AccordionItemPanel" class="accordion__panel" role="region" aria-labelledby="accordion__heading-raa-0" id="accordion__panel-raa-0">In pariatur <a href="#">excepteur</a> ut do aliquip qui mollit aliqua exercitation <a href="#">excepteur</a> consequat reprehenderit nostrud laborum voluptate veniam non dolore dolore aliqua incididunt amet nisi minim cillum elit.</div>
example without any role of the AccordionItemPanel: click to check example of the highlighted title
<div data-accordion-component="AccordionItemPanel" class="accordion__panel" aria-hidden="false" aria-labelledby="accordion__heading-raa-6" id="accordion__panel-raa-6">In pariatur <a href="#">excepteur</a> ut do aliquip qui mollit aliqua exercitation <a href="#">excepteur</a> consequat reprehenderit nostrud laborum voluptate veniam non dolore dolore aliqua incididunt amet nisi minim cillum elit.</div>
There is explanation from axeDevTools: axe.deque.com
The text was updated successfully, but these errors were encountered: