Skip to content

[EuiStat] Description containing focusable elements causes accessibility tests to fail #5273

@cjcenizal

Description

@cjcenizal

In elastic/kibana#115121, I'm planing an EuiIconTip inside the description of EuiStat:

image

This causes our accessibility tests to fail:

   │ VIOLATION
   │   [aria-hidden-focus]: Ensures aria-hidden elements do not contain focusable elements
   │     Help: https://dequeuniversity.com/rules/axe/4.0/aria-hidden-focus?application=axeAPI

I believe this is due to https://github.com/elastic/eui/blob/master/src/components/stat/stat.tsx#L118, introduced in #3693. From reading the discussion on that PR I couldn't follow the reasoning behind this decision -- maybe it was made in error? Either way, can we update this component to support arbitrary, focusable elements being passed to description?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions