Skip to content

Conversation

@llastflowers
Copy link
Contributor

What are you trying to accomplish?

  • Address a11y remediation issue
  • Add missing sr announcement in Summary As Button Lookbook story

Integration

N/A

List the issues that this change affects.

Relates to https://github.com/github/accessibility-audits/issues/14766

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back.
  • Medium risk changes that are isolated, reduced in scope or could impact few users. The change will not impact library availability.
  • High risk changes are those that could impact customers and SLOs, low or no test coverage, low observability, or slow to rollback.

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

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews (Lookbook)
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@llastflowers llastflowers requested a review from a team as a code owner January 21, 2026 21:22
@changeset-bot
Copy link

changeset-bot bot commented Jan 21, 2026

🦋 Changeset detected

Latest commit: 1616537

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/view-components Patch

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

Copy link
Contributor

Copilot AI left a 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.

@llastflowers llastflowers changed the title Add missing sr announcement in Summary As Button story Add missing SR announcement in Summary As Button story Jan 21, 2026
Copy link
Contributor

@liuliu-dev liuliu-dev left a comment

Choose a reason for hiding this comment

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

Looks great! ✨

@llastflowers llastflowers added this pull request to the merge queue Jan 22, 2026
Merged via the queue into main with commit 453041c Jan 22, 2026
32 checks passed
@llastflowers llastflowers deleted the llastflowers/14766/summary-as-button-sr-announcement-fix branch January 22, 2026 19:06
@primer primer bot mentioned this pull request Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants