fix(a11y): accommodate text-spacing overrides on Badge and Chip (WCAG 1.4.12)#3433
Open
bilal-karim wants to merge 2 commits into
Open
fix(a11y): accommodate text-spacing overrides on Badge and Chip (WCAG 1.4.12)#3433bilal-karim wants to merge 2 commits into
bilal-karim wants to merge 2 commits into
Conversation
Three same-family fixes for SC 1.4.12 Text Spacing. WCAG requires that text-spacing user overrides (line-height 1.5, letter-spacing 0.12em, etc.) not cause content loss. - Badge: leading-4 (16px) -> leading-[1.5]. text-sm at 1.5 line- height is 21px which previously clipped. - Chip: h-7 -> min-h-7, add leading-[1.5]. Preserves the 28px visual minimum but allows growth. - Table row: h-8 -> min-h-8. The densest text-bearing surface in the product. Preserves the 32px default but allows growth under user override. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Per reviewer feedback: <tr> uses table layout rules, where the height property already acts as a minimum (the row grows to fit cell content). min-height on <tr> is either ignored or behaves differently per browser. The change broke the skeleton table without providing the intended SC 1.4.12 benefit -- under text-spacing override, the row would have grown naturally. Badge and chip portions of the PR remain in place (those are flex elements where min-h-* works as expected). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
Thanks for flagging this @Alex-Tideman. I reverted the table change after some further investigation. The table row's height property already behaves like a minimum, just like you flagged. No need for additional modifications. Given that it's removed, I don't think we need to update the skeleton anymore. |
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
Two same-family fixes for SC 1.4.12 Text Spacing on
display: flexprimitives. WCAG requires user-applied text-spacing overrides (line-height 1.5, letter-spacing 0.12em, word-spacing 0.16em) to not cause content loss.src/lib/holocene/badge.svelte):leading-4(16px) →leading-[1.5].text-smat 1.5 line-height is 21px which previously clipped against the fixed 16px line-height.src/lib/holocene/chip.svelte):h-7→min-h-7, addleading-[1.5]. Preserves the 28px visual minimum but allows growth.Note on the table-row change
An earlier version of this PR also touched
<tr>height insrc/lib/holocene/table/table.svelte(h-8→min-h-8). @Alex-Tideman caught that this didn't work:<tr>uses CSS table-row layout rules where theheightproperty already behaves as a minimum (the row grows to fit cell content).min-heighton<tr>is either ignored or behaves differently per browser, which brokeSkeletonTablerendering. Verified empirically with the WCAG text-spacing override applied to the workflows table — the existingh-8rows accommodate the larger line-height without clipping (rows measure ~36px due to borders; 21px content fits comfortably).Reverted the table-row change in a follow-up commit; this PR now contains only the Badge and Chip fixes.
Audit context
audit-output/issues/1.4.12-{badge-line-height,chip-height}.md.1.4.12-table-cell-height.mdhas been left for a separate update to the audit doc — the predicted clipping doesn't manifest in practice because of CSS table-row semantics.Test plan
Verification bookmarklet (or paste in DevTools console):
flex-wrapcontainers reflow.🤖 Generated with Claude Code