-
Notifications
You must be signed in to change notification settings - Fork 132
Add missing SR announcement in Summary As Button story #3867
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
Add missing SR announcement in Summary As Button story #3867
Conversation
🦋 Changeset detectedLatest commit: 1616537 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses an accessibility remediation issue by adding a screen reader announcement for the Summary As Button Lookbook story. The change ensures that when the details element is toggled open, screen readers announce the descriptive text that becomes visible.
Changes:
- Added a hidden live region element that announces content to screen readers when the details element is toggled
- Implemented a toggle event handler to update the live region with the appropriate message
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
liuliu-dev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! ✨
What are you trying to accomplish?
Integration
N/A
List the issues that this change affects.
Relates to https://github.com/github/accessibility-audits/issues/14766
Risk Assessment
What approach did you choose and why?
is always present and only visibility is toggled, so SR does not announce it when it appears (after clicking the button). This adds a hidden announcer that is updated when the element opens.
Anything you want to highlight for special attention from reviewers?
N/A
Accessibility
Fix for a11y audit remediation issue
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.