Skip to content

[EuiLoadingChart][SCREENREADER]: Consider updating the loading indicators' role to "status" and adding aria-busy attribute #5843

@1Copenut

Description

@1Copenut

Summary

@cchaos has improved the EuiLoadingChart component by adding a role and aria-label. This changeset also included the other loading indicators.

I'd like to explore adding an aria-busy attribute to a wrapper, and/or changing the role to "status" for the loading indicators. The goal of this changeset will be to have screen readers announce the loading indicator without having to take keyboard focus. My comment from the original PR:

I agree with this iterative approach. Adding the role="progressbar" and aria-label="Loading" give clues that content is being fetched async. This technique assumes screen reader users are navigating node to node, using the virtual/browse mode. Users navigating by focus with the TAB key will not land on the loading indicator. Users who are listening for cues via live regions will also never hear this information.

I'm going to open a spike ticket to explore this concept in a future breaking change. I'd like to see us use the aria-busy attribute and move to a role="status" for these loading indicators. That way screen readers will announce changes as a live region without requiring us to manage focus or users to seek them out.

Our loading indicators are a good example of a WCAG 2.1 SC 4.1.3 status message, example #5:

An application displays a progressbar to indicate the status of an upgrade. The element is assigned a suitable role. The screen reader provides intermittent announcements of the progress.

Tasks

  • Develop proof-of-concept code that works across major screen readers (NVDA, JAWS, VoiceOver)
  • Test code with subject matter experts in a11y and UX
  • Add code with a breaking change PR

Success criteria

  • Zero axe-core (browser and CI) violations reported
  • Screen readers announce the Loading indicator without requiring keyboard focus OR
  • Content currently being loaded is hidden from users

Related issues

Guidance

Metadata

Metadata

Assignees

No one assigned

    Labels

    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