Repository navigation
fix: only set Link aria-current on exact pathname matches - #8994
YehudaMenahem wants to merge 1 commit into
Conversation
Fuzzy/ancestor Links stay visually active for styling, but aria-current="page" is reserved for the exact current path so hierarchical nav no longer announces multiple current pages. Closes TanStack#8979 Co-authored-by: Yehuda Menahem <jmenahem@gmail.com>
🦋 Changeset detectedLatest commit: ad960fb The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 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 actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
🎯 Changes
Fixes #8979.
Fuzzy/ancestor Links remain visually active (
isActive,activeProps,data-status), butaria-current="page"is only set when the link pathname matches the current location exactly. That matches ARIA guidance that only one element in a set should be marked current.Docs note this under Active Options. Includes a changeset.
✅ Checklist
🚀 Release Impact
Summary by CodeRabbit
aria-current="page"is set only on links whose pathname exactly matches the current page. Fuzzy ancestor links remain active for styling.aria-currentbehave for exact and fuzzy link matches.