Repository navigation
Conversation
|
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.
Overview
Adds interactive Sandpack examples to the guides, so readers can try each pattern with the arrow keys directly in the docs instead of only reading static snippets.
Changes
Each example sits right after the snippet it demonstrates, introduced by a short "Try it live" line explaining what to press and what to watch for.
Guides (new live example after the existing snippet):
quick-start.md: the basic focusable buttons from the guide.focus-hierarchy.md: sibling containers, withhasFocusedChildhighlighting the active sidebar.focus-boundaries.md: a modal that traps focus withisFocusBoundaryand returns focus to the trigger on close (autoRestoreFocus).event-callbacks.md:onFocus/onEnterPresslogged on screen, showing the latestextraProps.programmatic-focus.md: a grid driven bysetFocus/navigateByDirection, withgetCurrentFocusKeyshown live.accessibility-labels.md: a panel showing exactly whatonUtterTextreceives as focus moves between regions and leaves.rtl-support.md: togglingupdateRtlflips arrow-key navigation with no component changes.Recipes (
recipes.md): the static snippets are replaced by live, always-open examples (<Sandpack alwaysOpen>), so the code stays visible and editable:hasFocusedChildonArrowPress/onArrowReleasedoesFocusableExist+setFocus)Other:
quick-start.md.Notes
<Sandpack>MDX component.How to review
Open the affected guide pages in the docs preview, click into each example, and follow its "Try it live" instructions.