Repository navigation
fix(a11y): bring every pointer target up to the 24px floor - #712
Merged
Merged
Conversation
Thirteen of thirty-eight interactive controls were below 24×24 (WCAG 2.2 SC 2.5.8). Re-measured in the running app afterwards: none are. Five groups, each needing a different answer: - Toolbar buttons along the title bar were 20px tall. `min-h-6` rather than more padding — the bar is only 36px, and padding would have pushed the row out of shape. - Status-bar controls were 15px inside a 24px row. `h-full` was the obvious fix and silently did nothing: the row centres its children, so a percentage height has nothing to resolve against. An explicit minimum does not care. - The query toolbar's icon buttons and the row-limit input were 20–22px. The icons are fine at 12px; it was the box around them that was short. - The explain-mode chevron was 21px wide, being half of a segmented control. - The two splitters are 4px, and should stay 4px: their width is part of the layout, and a 24px divider is a different design. The grab area around them is widened instead, with an invisible overlay. The splitters needed a second pass. The widened area worked to the left and not to the right, because the adjacent panel painted over it — `z-10` fixes that. Worth recording how it was found: measuring the CSS offsets said both sides were fine. Only hit-testing with elementFromPoint showed the truth, and the same measurement is what confirms 0 of 36 now. No regression guard ships with this, deliberately. Three attempts at one all failed, in instructive ways: a sweep in AppLayout's browser test measured nothing at all, because that file mocks every child to a stub — it passed by finding zero elements, which is the exact failure mode this project has been adding count assertions to prevent. Moving it to TitleBar's browser test found the right eight controls but measured them at 33px tall, because a component rendered standalone is not under the layout constraints that made them 20px in the app. A guard that cannot reproduce the geometry cannot defend it, and a guard that passes regardless is worse than none. Followed up separately. Closes #705.
EVWorth
added a commit
that referenced
this pull request
Sep 18, 2026
…t targets (#716) #713 said a pointer-target guard could not be built here, after three attempts failed. The reason turned out to be one line: `test-setup.ts` never imported `globals.css`, so every browser test has been rendering unstyled markup. `text-xs` computed to 16px. `h-9` computed to zero. `px-2` to zero. That is why the earlier sweep measured the title bar's buttons at 33px tall while they were 20px in the app — it was measuring browser defaults, and no assertion about size, spacing or colour made in that suite could have meant anything. Two further things had to be true before the guard was worth writing: - The viewport was 414×896, a phone, for a desktop app. It put the window controls at x=430, off the right edge, where `elementFromPoint` cannot reach them — they measured as -1×-1. Now 1280×800. - The sweep reports how many controls it swept and fails if that is too few. An earlier version of this test lived in AppLayout's browser test, where every child is mocked to a stub; it measured nothing, found nothing, and passed. That is the failure mode this project keeps meeting, and the count assertion is the only thing that catches it. With those fixed, the guard works. Reverting the `min-h-6` from #712 now fails it with the real numbers: Admin Tools is 49×21 Import Data is 49×21 Theme: Dark — click for Light is 30×19 Hit-testing rather than reading the box, because a control can be larger than it looks — the splitters keep a 4px line and widen only the area around them, and reading CSS offsets reports a widened area as passing even when a neighbour paints over it. All 341 browser tests still pass with the stylesheet loaded, so nothing was depending on the absence of styles. jsdom ignores the import, so the unit suite is untouched. Closes #713.
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.
Wave 3 of the UI review.
Closes #705.
13 of 38 interactive controls were below 24×24 (WCAG 2.2 SC 2.5.8).
Re-measured in the running app: 0 of 36.
Five groups, five different answers
min-h-6— the bar is 36px, padding would distort the rowmin-w-6h-fullon the status bar silently did nothing. The row centres itschildren, so a percentage height has nothing to resolve against. It looked
like a fix and changed no pixels. An explicit minimum doesn't care about the
parent.
The splitters keep their 4px line — the width is part of the layout, and a
24px divider is a different design. An invisible overlay widens the grab area
instead.
They needed a second pass: the widened area worked to the left and not the
right, because the adjacent panel painted over it.
z-10fixes it. Worthrecording how that surfaced — measuring the CSS offsets said both sides
were fine. Only hit-testing with
elementFromPointshowed the truth, andthat's the measurement behind both the before and after numbers.
No regression guard ships with this, deliberately
Three attempts, all instructive:
AppLayout.browser.test.tsxmeasured zero elements — thatfile mocks every child to a stub. It passed by finding nothing, which is
the exact failure mode I've been adding count assertions elsewhere to
prevent, and I walked into it anyway.
TitleBar.browser.test.tsx, it found the right eight controls —and measured them at 33px tall. A component rendered standalone isn't
under the layout constraints that made them 20px in the app.
that passes regardless is worse than none.
Filed separately. The fixes are verified against the real app; what's missing
is something to stop them regressing, and I'd rather say so than ship a green
tick that means nothing.
Verification
🤖 Generated with Claude Code