Skip to content

fix: support aria-current in LinkContext - #10573

Open
andrew-pledge-io wants to merge 3 commits into
adobe:mainfrom
andrew-pledge-io:link-aria-current
Open

fix: support aria-current in LinkContext#10573
andrew-pledge-io wants to merge 3 commits into
adobe:mainfrom
andrew-pledge-io:link-aria-current

Conversation

@andrew-pledge-io

Copy link
Copy Markdown

Closes #10572

Summary

Adds aria-current to the Link hook props used by LinkContext, so context provider values can include the current-link state. A RAC regression test verifies that Link renders the attribute. This aligns Link with Button and preserves its existing runtime behavior.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices
  • I understand every change in this PR and can explain why it is there.
  • If AI-assisted, I followed our AI contribution guidance and pointed my assistant at CLAUDE.md.

📝 Test Instructions:

Run corepack yarn jest packages/react-aria-components/test/Link.test.js --runInBand.

Verify that <Link aria-current="page"> renders aria-current="page".

🧢 Your Project:

N/A

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.

LinkContext does not accept aria-current

2 participants