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

A11y: Improve test runner recipe #29226

Merged
merged 2 commits into from
Sep 30, 2024
Merged

Conversation

shilman
Copy link
Member

@shilman shilman commented Sep 27, 2024

Closes N/A

What I did

Also reuse the a11y addon's custom element selector on the test runner, if the user has set it.

Checklist for Contributors

Testing

Manual testing

Did not manual test, but should be simple enough to create a story with a custom element selector and run it in the test runner.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

Greptile Summary

This change enhances the accessibility testing configuration in the Storybook test runner by allowing custom element selectors in story parameters.

  • Added support for custom element selectors in docs/_snippets/test-runner-a11y-configure.md
  • Improved flexibility for targeting specific elements in accessibility checks
  • Fallback to default '#storybook-root' selector if no custom selector is provided
  • Aligns test runner behavior with the a11y addon's custom element selector feature

@shilman shilman added documentation addon: a11y test-runner ci:docs Run the CI jobs for documentation checks only. labels Sep 27, 2024
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

LGTM

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

nx-cloud bot commented Sep 27, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit ee2c2bb. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@jonniebigodes jonniebigodes self-assigned this Sep 27, 2024
Copy link
Contributor

@kylegach kylegach left a comment

Choose a reason for hiding this comment

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

Thank you!

Copy link
Contributor

@jonniebigodes jonniebigodes left a comment

Choose a reason for hiding this comment

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

All is good on my end, going to merge this. Thank you.

@jonniebigodes jonniebigodes merged commit ca93881 into next Sep 30, 2024
9 checks passed
@jonniebigodes jonniebigodes deleted the shilman/improve-a11y-recipe branch September 30, 2024 16:43
@github-actions github-actions bot mentioned this pull request Oct 1, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: a11y ci:docs Run the CI jobs for documentation checks only. documentation test-runner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants