Add descriptive labels to Footnote return links#1211
Conversation
🦋 Changeset detectedLatest commit: ddefceb The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
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 |
🟢 No design token changes found |
There was a problem hiding this comment.
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-labelattribute 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) |
🟢 Unit test coverage changes foundUnit test coverage has been updated through this PR. Changes: 0 new tests, 0 removed tests, 1 improved, 0 decreased
|
🟢 No visual differences foundOur visual comparison tests did not find any differences in the UI. |
Summary
Towards https://github.com/github/accessibility-audits/issues/14513
Expands the
aria-labelin return links to includechildren, per the recommendation made in the a11y audit.Resolves a sev-2 accessibility bug.
List of notable changes:
What should reviewers focus on?
Steps to test:
Supporting resources (related issues, external links, etc):
Contributor checklist:
update snapshotslabel to the PR)Reviewer checklist:
Screenshots: