Skip to content

docs: clarify correct usage of accessibilityRole "link" (fixes #3215) - #5287

Merged
Simek merged 1 commit into
react:mainfrom
supunyasanthaofficial:fix/clarify-accessibility-role-link
Oct 19, 2026
Merged

Simek merged 1 commit into
react:mainfrom
supunyasanthaofficial:fix/clarify-accessibility-role-link

Conversation

@supunyasanthaofficial

Copy link
Copy Markdown
Contributor

Fixes #3215.

Summary

The current documentation for accessibilityRole="link" and role="link" only says that the element should be treated as a link. This can be confusing when deciding whether to use link or button for in-app navigation.

This PR clarifies that link should be used for elements that open an external URL or web page, while buttons should be used for in-app navigation and actions.

Changes

  • Updated the link descriptions in docs/accessibility.md to explain when to use link instead of button.
  • Applied the same changes to the versioned docs from 0.77 through 0.87.

Test Plan

  • Ran ESLint on docs/accessibility.md.
  • Verified that the Docusaurus production build succeeds.

@meta-cla meta-cla Bot added the CLA Signed label Oct 19, 2026
Comment thread website/versioned_docs/version-0.77/accessibility.md Outdated
@supunyasanthaofficial
supunyasanthaofficial force-pushed the fix/clarify-accessibility-role-link branch from 076e46a to 54b4d80 Compare October 19, 2026 08:48

@Simek Simek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the update! 👍

@Simek
Simek merged commit 7a9843c into react:main Oct 19, 2026
8 checks passed
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.

Please document correct usage of accessibilityRole "link"

2 participants