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

role="tablist" role="tab" role="tabpanel" errors #15032

Closed
Robanna777 opened this issue May 2, 2023 · 2 comments
Closed

role="tablist" role="tab" role="tabpanel" errors #15032

Robanna777 opened this issue May 2, 2023 · 2 comments
Assignees

Comments

@Robanna777
Copy link

Below is a sample HTML from a Beaver Builder Accordion that I keep getting an error:
Elements with an ARIA [role] that require children to contain a specific [role] are missing some or all of those required children.

It seems like 'tablist' has a descendant of 'tab', and tab has a descendant of 'tabpanel'. On older versions of Lighthouse, I do not get the error, but I do on 10.1.1. Is this bug in Lighthouse, or does the code need help? Do the tabs need to be children, or is grandchild acceptable?

I'm new to all of this, so any help is great appreciated. Thank you,

<div multiselectable="true" class="fl-accordion fl-accordion-small" role="tablist">
<div class="fl-accordion-item fl-accordion-item-active" id="accordion-0">
<div class="fl-accordion-button" id="fl-accordion-kago2701m894-tab-0" aria-selected="false" aria-controls="fl-accordion-kago2701m894-panel-0" aria-expanded="true" role="tab" tabindex="0">
<a href="#" role="button" id="fl-accordion-kago2701m894-label-0" class="fl-accordion-button-label" tabindex="0" aria-controls="fl-accordion-kago2701m894-panel-0">Item 1</a>
<a href="#" role="button" id="fl-accordion-kago2701m894-icon-0" class="fl-accordion-button-icon fa-minus" tabindex="0" aria-controls="fl-accordion-kago2701m894-panel-0"><i class="fl-accordion-button-icon fl-accordion-button-icon-right fas fa-minus"><span class="sr-only">Collapse</span></i></a>
</div>
<div class="fl-accordion-content fl-clearfix" id="fl-accordion-kago2701m894-panel-0" aria-labelledby="fl-accordion-kago2701m894-tab-0" role="tabpanel" aria-live="polite" style="display: block;">
<p>Some text for item 1</p>
</div>
</div>
<div class="fl-accordion-item " id="accordion-1">
<div class="fl-accordion-button" id="fl-accordion-kago2701m894-tab-1" aria-selected="false" aria-controls="fl-accordion-kago2701m894-panel-1" aria-expanded="false" role="tab" tabindex="0">
<a href="#" role="button" id="fl-accordion-kago2701m894-label-1" class="fl-accordion-button-label" tabindex="0" aria-controls="fl-accordion-kago2701m894-panel-1">Item 2</a>
<a href="#" role="button" id="fl-accordion-kago2701m894-icon-1" class="fl-accordion-button-icon" tabindex="0" aria-controls="fl-accordion-kago2701m894-panel-1"><i class="fl-accordion-button-icon fl-accordion-button-icon-right fas fa-plus"><span class="sr-only">Expand</span></i></a>
</div>
<div class="fl-accordion-content fl-clearfix" id="fl-accordion-kago2701m894-panel-1" aria-labelledby="fl-accordion-kago2701m894-tab-1" role="tabpanel" aria-live="polite">
<p>Some text for item 2</p>
</div>
</div>
</div>
@adamraine
Copy link
Member

Looks like this was changed when we upgraded to axe-core 4.5.0 (Likely dequelabs/axe-core#3597)

From what I can tell, this is working as intended. tab needs to be a direct child of tablist. If you have any further questions, I recommend asking on https://github.com/dequelabs/axe-core.

@Robanna777
Copy link
Author

Robanna777 commented May 2, 2023 via email

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

No branches or pull requests

4 participants