Skip to content

Conversation

@walterra
Copy link
Contributor

@walterra walterra commented Jul 9, 2025

Summary

This PR adds e2e accessibility tests to assert screen reader summaries for different chart types and configurations. The aim is to get a baseline of the current state of these summaries before we merge the improvements being worked on in #2683. This will allow us to track regressions/improvements in a better way.

Details

The accessibility e2e tests pick up the existing setup to run visual regression tests. Originally I thought we could run them as part of the visual regression tests, but then it would be tricky to run them locally because the visual ones don't pass there. So I implemented this via a separate command you can run via yarn test:e2e:a11y. Like the visual regression tests, the a11y ones also walk through the storybook examples and then assert the screen reader description (what's within .echScreenReaderOnly).

I added the tests to the CI setup too, the scripts are mostly copies of the ones used for the visual regression tests.

Open Question: We now run yarn test:e2e for visual regression tests and yarn test:e2e:a11y. Should we be more explicit about the visual regression test ones (like yarn test:e2e:vrt) - and also update descriptive texts to include VRT or Visual Regression Testing for the default e2e tests?

Issues

Part of #36386.

Checklist

  • The proper feature labels have been added (e.g. :interactions, :axis)
  • All related issues have been linked (i.e. closes #123, fixes #123)
  • Unit/e2e tests have been added or updated to match the most common scenarios

@walterra walterra changed the title A11y e2e baseline test: e2e baseline tests for a11y screen reader descriptions Jul 9, 2025
@walterra walterra self-assigned this Jul 9, 2025
@walterra walterra added the :accessibility Accessibility related issue label Jul 9, 2025
@walterra walterra marked this pull request as ready for review July 9, 2025 08:25
@walterra walterra changed the title test: e2e baseline tests for a11y screen reader descriptions test(a11y): e2e baseline tests for a11y screen reader descriptions Jul 9, 2025
@walterra walterra requested a review from nickofthyme July 10, 2025 07:27
Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, I just like to wait for @nickofthyme review on the CI part but looks working/running fine!

@walterra
Copy link
Contributor Author

@nickofthyme as discussed I renamed the existing playwright tests/reports to include a reference to VRT so we have a better VRT/A11Y distinction for the e2e tests.

Copy link
Collaborator

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass on test code, looking at ci changes now.

@walterra walterra merged commit d8b205a into elastic:main Aug 11, 2025
16 checks passed
@walterra walterra deleted the a11y-e2e-baseline branch August 11, 2025 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:accessibility Accessibility related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants