Repository navigation
Conversation
added 10 commits
November 16, 2026 10:21
The 16px box keeps its size; an absolutely positioned `::after` with a 5px negative inset (measured from the padding box, inside the 1px border) makes the tappable region 24×24 (WCAG 2.5.8 target size). Table cells that hold a checkbox keep 4px on the right instead of 0 so the hit area stays inside the cell when the column is squeezed to its minimum width next to a pinned column.
The day segment was 23.9px wide at 16px text and every segment was 20px tall at 14px text. `min-h-6 min-w-6` keeps each spinbutton at least 24×24 inside the 36px group; only the focused segment's background grows.
…alue `p-1.5` makes the button 24×24; negative margins keep its 20×20 footprint so the value and the icon stay where they were.
The close button was the bare 16px icon. 4px of padding and a 12px offset keep the icon where it was and give it a 24×24 target.
`p-1.5` makes the remove button 24×24; a negative margin keeps its 16×16 footprint, so chips keep their size.
A pseudo element adds 2px above and below the 20px trigger without changing the badge row's height.
The caret button is 24×24 with a 2px negative margin, so it still takes one indent step and child rows line up as before.
`size="xs"` tabs were 20px (icon-only 20×20 with a 2px gap, which fails WCAG 2.5.8 even with the spacing exception). The tab is now at least 24×24 and the track uses `p-0.5`, so the track stays 28px and still aligns with Button xs. The active capsule is 4px taller than before.
Contributor
Code Metrics Report
Details | | main (e4b5616) | #737 (f4651e7) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 62.9% | 62.9% | +0.0% |
| Files | 294 | 294 | 0 |
| Lines | 13513 | 13514 | +1 |
+ | Covered | 8505 | 8509 | +4 |
+ | Test Execution Time | 4m29s | 3m31s | -58s |Code coverage of files in pull request scope (66.1% → 66.4%, patch 100.0%)
Reported by octocov |
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> # Conflicts: # docs-manifest.json
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
Part of the mobile umbrella tailor-inc/platform-planning#2207 (Phase 2, "Many tap targets are smaller than 24 x 24 px (checkbox, tooltip trigger, small tabs, date segments)").
The rule this PR applies: every library control has a hit area of at least 24×24 CSS px on its own, without relying on the spacing exception of WCAG 2.5.8 (Target Size, Minimum). The exception depends on what the consumer places next to the control, which the library cannot guarantee. The look does not change: where the control stays small, the tappable region is extended with a pseudo element or with padding plus a negative margin, so nothing around it moves.
Measured on
main(b4ede51) with the vite example at 375 px (iPhone) and 768 px (iPad) touch emulation, 34 pages and 11 interaction states: 10 kinds of controls were under 24 px. Three failed the criterion outright (xs capsule tabs, the dialog close button, breadcrumb links at 375 px); the others only passed through the spacing exception. The breadcrumb is #736.Changes
One commit per control.
Checkbox::afterwith a 5px negative inset (measured from the padding box, inside the 1px border). Table cells that hold a checkbox keep 4px on the right instead of 0, so the hit area stays inside the cell when the column is squeezed next to a pinned column.DateField,DatePicker,DateRangePicker)min-h-6 min-w-6on each spinbutton; the group stays 36px tall.DescriptionCardcopy buttonp-1.5with-my-0.5 -mr-0.5.Dialogclose buttonp-1, offset 12px instead of 16px so the icon stays put.Comboboxchip removep-1.5 -m-1.BadgeList"+N" trigger::afteradding 2px above and below.DataTablesub-row caretsize-6 -m-0.5.Tabscapsulesize="xs"min-h-6 min-w-6; the track usesp-0.5instead ofp-1, so it stays 28px and aligned with Button xs.Behavior change: the active capsule of an xs tab list is 4px taller than before (24px inside a 28px track). A table checkbox column has 4px of right padding instead of 0, which shows only when the column is squeezed to its minimum width (28 → 32px at 375 px); at normal widths the 52px column is unchanged.
Docs: a sentence on the Checkbox and Tabs pages. A patch changeset.
Results
Playwright (Chrome, touch emulation) on the vite example, before (
mainatb4ede51) and after. "Hit area" is measured withelementFromPointstepping 0.5px outwards from each edge of the control, so it is a lower bound; the computed::afterbox is also listed for the pseudo-element cases.::after24×24)::after24×24)::after31.6×24)768 px gives the same numbers, except the date segments start at 20px tall (14px text) and the +N trigger at 22px.
Across all 34 example pages and 11 states, interactive elements with a bounding box under 24 px went from 614 to 360 (both viewports together). What remains: the breadcrumb links (#736), the 16px checkbox boxes (their hit area is now 24px, which a bounding-box survey does not see), the input inside
Combobox.Chips(the 36px chips group is the real target), the example page's native range sliders, and links inside running text.Full tables:
hit-before.md/hit-after.mdandtargets.mdin the measurement folder (attached as needed).Screenshots
Each pair is a 160×96 px crop at 375 px, before (
main) and after. Red outline: the control's box. Blue dashed outline: the::afterhit area where one is used.pr-b/crops/checkbox-row_before.png→checkbox-row_after.pngtabs-xs_before.png→tabs-xs_after.pngdialog-close_before.png→dialog-close_after.pngdate-segment_before.png→date-segment_after.pngsub-rows-caret_before.png→sub-rows-caret_after.pngdescription-card-copy_before.png→description-card-copy_after.pngcombobox-chip-remove_before.png→combobox-chip-remove_after.pngbadge-list-plus_before.png→badge-list-plus_after.pngChecks
pnpm fmt,type-check,lint,test(3,095 core tests after mergingmainatc90cdf6, 19 snapshots updated for the class changes),docs:syncanddocs:checkpass.check-dtsnot run (no declaration changes).size-4and has the::afterinset; every date segment hasmin-h-6 min-w-6; the copy button, dialog close, chip remove and sub-row caret have their padding and negative margins; the +N trigger has its::after; xs capsule tabs aremin-h-6with ap-0.5track while sm keepsp-1.Not in this PR
DataTableand the Sonner toast close button were not measured (no chip or toast could be produced in the example run); statically the chip button is 24px wide and as tall as the chip.🤖 Generated with Claude Code