Fix carousel dot focus loss with VoiceOver activation#127
Open
deepakpra wants to merge 2 commits intortCamp:developfrom
Open
Fix carousel dot focus loss with VoiceOver activation#127deepakpra wants to merge 2 commits intortCamp:developfrom
deepakpra wants to merge 2 commits intortCamp:developfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an accessibility regression where activating carousel pagination dots via VoiceOver keyboard interaction causes focus to be lost, by keeping the pagination dots’ backing array stable when the number of scroll snaps hasn’t changed.
Changes:
- Avoid recreating
context.scrollSnapson every Emblaselectupdate; only rebuild when the snap count changes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
theMasudRana
requested changes
Apr 29, 2026
Collaborator
There was a problem hiding this comment.
@deepakpra,
Thanks for addressing the scrollSnapList() reuse feedback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes an accessibility issue where carousel pagination dots lose focus after being activated with VoiceOver keyboard interaction. The dot list is now preserved when the scroll snap count has not changed, preventing unnecessary re-rendering of the focused dot element.
Type of change
Related issue(s)
Closes #126
What changed
context.scrollSnapsfrom being recreated on every carousel selection.Breaking changes
Does this introduce a breaking change? If yes, describe the impact and migration path below.
Testing
Describe how this was tested.
Test details:
Control + Option + Space.Screenshots / recordings
Screen.Recording.2026-04-24.at.11.40.14.AM.mov
Checklist