Skip to content

Accessibility Labels#227

Merged
asgvard merged 4 commits intomainfrom
dmytro/accessibility-v3-compat
Apr 24, 2026
Merged

Accessibility Labels#227
asgvard merged 4 commits intomainfrom
dmytro/accessibility-v3-compat

Conversation

@asgvard
Copy link
Copy Markdown
Collaborator

@asgvard asgvard commented Apr 23, 2026

Introduces a new optional onUtterText callback on init() and an accessibilityLabel prop on useFocusable() (and the underlying addFocusable / updateFocusable payloads).
When focus lands on a focusable component, the library concatenates the labels of all newly-entered parent regions with the leaf node's own label and passes the resulting string to onUtterText. Parent region labels are only included when focus enters a region for the first time (similar to how aria-label on role="region" behaves), so subsequent focus moves within the same parent only utter the leaf label.

TBD: Should we introduce the feature of uttering text when the accessibilityLabel prop change while component is already focused for better reactivity?

@asgvard asgvard requested a review from a team as a code owner April 23, 2026 11:12
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 23, 2026

🦋 Changeset detected

Latest commit: ed7292c

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

This PR includes changesets to release 3 packages
Name Type
@noriginmedia/norigin-spatial-navigation-core Minor
@noriginmedia/norigin-spatial-navigation-react Minor
@noriginmedia/norigin-spatial-navigation Minor

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

@asgvard
Copy link
Copy Markdown
Collaborator Author

asgvard commented Apr 23, 2026

CI green, first failure was due to Rebase from main with Prettier+Husky that was not executed locally because no commits were done, only Rebase+Push.

@asgvard asgvard force-pushed the dmytro/accessibility-v3-compat branch from b8bdb73 to ba83951 Compare April 23, 2026 13:12
Comment thread packages/core/src/SpatialNavigation.ts Outdated
@asgvard asgvard requested a review from xavi160 April 24, 2026 13:30
Copy link
Copy Markdown
Collaborator

@xavi160 xavi160 left a comment

Choose a reason for hiding this comment

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

👏🏻

@asgvard asgvard merged commit 0a867bd into main Apr 24, 2026
1 check passed
@asgvard asgvard deleted the dmytro/accessibility-v3-compat branch April 24, 2026 14:57
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.

2 participants