Repository navigation
fix(AppShell): replace hardcoded spacing with spacingVars tokens in skip link - #650
Merged
Merged
Conversation
…kip link The skip-to-content link used hardcoded pixel values for padding, top, and insetInlineStart in its :focus state. Replace with spacingVars tokens so theme authors can control skip link spacing through the token system. Changes: - padding: '8px 16px' → paddingBlock/paddingInline with --spacing-2/--spacing-4 - top: '8px' → spacingVars['--spacing-2'] - insetInlineStart: '8px' → spacingVars['--spacing-2'] - Add spacingVars to imports Co-authored-by: Navi <[email protected]>
Contributor
Author
|
Yeah should use the tokens |
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsAppShell · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
cixzhang
added a commit
that referenced
this pull request
Apr 26, 2026
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
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.
What
Theme audit for
XDSAppShell— the skip-to-content link used hardcoded pixel values for spacing in its:focusstate. This PR replaces them withspacingVarstokens so theme authors can control skip link positioning through the token system.Changes
padding'8px 16px'paddingBlock: spacingVars['--spacing-2']/paddingInline: spacingVars['--spacing-4']top'8px'spacingVars['--spacing-2']insetInlineStart'8px'spacingVars['--spacing-2']Also adds
spacingVarsto the import fromtokens.stylex.Audit Summary
Full theme audit of
XDSAppShell:colorVarstokensradiusVars['--radius-page']fontWeightVars,textSizeVarsapp-shell,{height, variant})Needs Review
The skip-to-content link is an accessibility pattern that only appears on keyboard focus. The hardcoded
8px/16pxvalues are small, unobtrusive positioning — not semantic UI spacing. While converting to tokens is technically correct and consistent, it does mean theme authors could inadvertently affect the skip link by changing global spacing tokens.Question for maintainers: Should the skip link spacing follow the token system (this PR), or should it be considered an a11y exception with fixed values? If fixed values are preferred, this PR can be reverted.
Testing