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

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

Open
Tracked by #5265
cjcenizal opened this issue Oct 15, 2021 · 2 comments

Comments

@cjcenizal
Copy link
Contributor

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?

@1Copenut
Copy link
Contributor

1Copenut commented Oct 15, 2021

Thank you for raising awareness on this issue @cjcenizal. Looking at your image, it appears the tooltip icons are focusable, and that's the source of the problem. I'm looking at the EuiStat component for ways to remove this error.

@cjcenizal
Copy link
Contributor Author

Thank you for looking into this @1Copenut! That's correct, those EuiIconTip instances are focusable (and need to be), so it seems like EuiStat needs some adjustment to support this.

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

3 participants