[EuiAccordion][AXE-CORE]: Interactive content in trigger must not have aria-expanded
attribute
#6689
Labels
accessibility - automated
accessibility - WCAG A
Level A WCAG Accessibility Criteria
accessibility
bug
Description
@darnautov brought this issue to our attention with Kibana PR 154237.
The
EuiAccordion
allows users to add interactive content next to the expand/collapse button as a way to surface multiple controls. When we do this, axe-core is throwing an error because we have anaria-expanded="true | false"
attribute on a non-button element.I'd recommend we check the
buttonElement
prop against the accepted values and conditionally render thearia-expanded
attribute on accordion.tsx#L377 only if theButtonElement === 'button'
.WCAG guidance
The text was updated successfully, but these errors were encountered: