Skip to content

[EuiAccordion][AXE-CORE]: Interactive content in trigger must not have aria-expanded attribute #6689

@1Copenut

Description

@1Copenut

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 an aria-expanded="true | false" attribute on a non-button element.

I'd recommend we check the buttonElement prop against the accepted values and conditionally render the aria-expanded attribute on accordion.tsx#L377 only if the ButtonElement === 'button'.

WCAG guidance


Screen Shot 2023-04-05 at 10 51 43 AM

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions