[EuiAccordion][AXE-CORE]: Review the accordions that create a fieldset
for ARIA attribute violation
#5767
Labels
accessibility - automated
accessibility - WCAG A
Level A WCAG Accessibility Criteria
accessibility
breaking change
stale-issue
stale-issue-closed
Description
The EuiAccordion component has three critical axe-core violations appearing in browser and CI scans with the latest version of the plugin. The issues are showing up in two ways, and will be addressed in separate tickets.
This issue is related to the "Styled for Forms" accordion examples. These wrap the accordion in a
<legend>
tag that's further nested in a<fieldset>
tag. The axe checker is complaining about this because legends can't contain the aria-expanded attribute.I would like to review this pattern. The MDN docs state a fieldset is meant to wrap related elements like radio buttons or checkboxes inside a form. The examples provided show/hide a form, but the button trigger is not included. I feel it would be better to not switch to a fieldset + legend, but that's a first take. I'll bring this up with the EUI team for context and history I might be missing.
Guidance
Prior Art
buttonContent
#5258The text was updated successfully, but these errors were encountered: