Repository navigation
Conversation
The Palette contents column on the Font size and family utility page stacks 21 groups of ~22px-tall token links with under 2px of vertical gap, failing WCAG 2.5.8 (Target Size Minimum). Add margin-bottom-05 (4px) to each stacked row, bringing the pitch to ~28px. Fixes uswds#2796
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
Added vertical breathing room between the stacked token links on the Font size and family utility page, so the links meet WCAG's minimum touch-target spacing.
Related issue
Closes #2796
Problem statement
In the "Palette contents" column on the Font size and family page, token links stack vertically in 21 groups. Each link is a tap target about 22px tall with under 2px of space to the next one — failing WCAG 2.5.8 (Target Size Minimum), which needs adjacent targets to reach a 24px pitch. On a phone, tapping the right token was a coin flip.
Solution
Added the smallest standard USWDS spacing utility (
margin-bottom-05, 4px) to each stacked row in_includes/utilities/typescale-palettes.html. That takes the row pitch from about 24px to about 28px — comfortably past the requirement without visually changing the table's character. The global token-link style was deliberately left alone: the issue notes other token usages around the site aren't affected, and a repo check confirmed this include is the only place with the stacked pattern.Testing and review
bundle exec rspecpasses (10 examples, 0 failures).