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

[LineAnnotation] improve accessibility (a11y) #2520

Open
alexwizp opened this issue Sep 9, 2024 · 2 comments
Open

[LineAnnotation] improve accessibility (a11y) #2520

alexwizp opened this issue Sep 9, 2024 · 2 comments
Labels
:accessibility Accessibility related issue bug Something isn't working

Comments

@alexwizp
Copy link
Contributor

alexwizp commented Sep 9, 2024

This issue is related to elastic/kibana#188861. During an a11y audit, we found a couple of issues with that component that we should address.

  1. All modes (clickable and icon modes): The annotation tooltip should be keyboard accessible. Currently, when rendered as a button, focus can be set using the keyboard, but the tooltip does not open. In icon mode, keyboard navigation does not work at all. This violates the WCAG 2.2 guidelines for keyboard accessibility and focus order.
    Proposed Solution: Please see how EUI team solved that issue for EuiIconTip.

  2. Clickable mode: The tooltip button should have a unique aria-label attribute.
    This violates the WCAG 2.2 guideline on "Info and Relationships".
    Proposed Solution: We need some mechanizm for setting required aria-label attribute.
    Axe plugin trigger the following issue here:

Image

Let's discuss how we can update the API to fix these issues.

@markov00
Copy link
Member

@nickofthyme do you remember why this is a button? I don't think this is clickable, do we need that?

@nickofthyme
Copy link
Collaborator

Yeah it's clickable when there is a Settings.onAnnotationClick callback defined. It's also handles keyboard a11y but doesn't seem great and the rest of the chart has no keyboard interactions.

Image

This recording starts with an onAnnotationClick enabled where it's a <button> then I remove it and it reverts back to a <div>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:accessibility Accessibility related issue bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants