Skip to content

Conversation

@rezrah
Copy link
Collaborator

@rezrah rezrah commented Dec 17, 2025

Summary

Towards https://github.com/github/accessibility-audits/issues/14513

Expands the aria-label in return links to include children, per the recommendation made in the a11y audit.

Resolves a sev-2 accessibility bug.

List of notable changes:

  • added the item text to the aria-label
  • updated tests
  • added a changeset

What should reviewers focus on?

  • Check that the aria-label includes the Footnote.Item text

Steps to test:

  1. Go to this (or any) Footnote story
  2. Inspect return icon link, and verify that the aria-label includes the adjacent text

Supporting resources (related issues, external links, etc):

Contributor checklist:

  • All new and existing CI checks pass
  • Tests prove that the feature works and covers both happy and unhappy paths
  • Any drop in coverage, breaking changes or regressions have been documented above
  • UI Changes contain new visual snapshots (generated by adding update snapshots label to the PR)
  • All developer debugging and non-functional logging has been removed
  • Related issues have been referenced in the PR description

Reviewer checklist:

  • Check that pull request and proposed changes adhere to our contribution guidelines and code of conduct
  • Check that tests prove the feature works and covers both happy and unhappy paths
  • Check that there aren't other open Pull Requests for the same update/change

Screenshots:

Please try to provide before and after screenshots or videos

Before After
Screenshot 2025-12-17 at 20 11 27 Screenshot 2025-12-17 at 20 09 25

@rezrah rezrah requested a review from a team as a code owner December 17, 2025 20:04
Copilot AI review requested due to automatic review settings December 17, 2025 20:04
@changeset-bot
Copy link

changeset-bot bot commented Dec 17, 2025

🦋 Changeset detected

Latest commit: ddefceb

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

This PR includes changesets to release 7 packages
Name Type
@primer/react-brand Patch
@primer/brand-css Patch
@primer/brand-primitives Patch
@primer/brand-e2e Patch
@primer/brand-fonts Patch
@primer/brand-config Patch
@primer/brand-storybook 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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 17, 2025

🟢 No design token changes found

Copy link

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 enhances the accessibility of Footnote return links by adding descriptive labels that include the footnote content. The change addresses a severity-2 accessibility issue identified in an audit, ensuring screen readers announce more context when reading the back links.

Key changes:

  • Updated the aria-label attribute to include the footnote's text content alongside "Back to content"
  • Modified the corresponding test to verify the new aria-label format
  • Added a changeset documenting this accessibility improvement

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/react/src/Footnotes/Footnotes.tsx Modified aria-label to append children content to "Back to content"
packages/react/src/Footnotes/Footnotes.test.tsx Updated test assertion to match new aria-label format and removed trailing space from test data
.changeset/lucky-socks-carry.md Added changeset documenting the accessibility enhancement
package-lock.json Version bumps across packages (0.60.1 → 0.61.0)

@github-actions
Copy link
Contributor

github-actions bot commented Dec 17, 2025

🟢 Unit test coverage changes found

Unit test coverage has been updated through this PR.

Changes: 0 new tests, 0 removed tests, 1 improved, 0 decreased

Component/Hook Statements Functions Branches Change
Footnotes 95.2% 95.5% 100.0% 92.3% +0.2%

@github-actions
Copy link
Contributor

github-actions bot commented Dec 17, 2025

🟢 No visual differences found

Our visual comparison tests did not find any differences in the UI.

@rezrah rezrah requested a review from danielguillan December 17, 2025 20:11
Copy link
Contributor

@danielguillan danielguillan 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants