Skip to content

test: accept the contents link's subpixel shortfall from the 44px touch floor - #5208

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-5163
Nov 3, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-5163

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Under touch, each contents link stands 43.984px tall, 1/64px short of the 44px floor test_a_table_of_contents_link_is_a_finger_s_aim checked exactly. The link reaches the floor through padding, (--aim-floor - 1lh) / 2 (toc.css). Since #4859 set the outline in --font-ui (14px at line-height 1.45, so a 20.3px line), Chrome truncates the line box and the padding to 1/64px layout units, and the sum falls short by one unit. Before that change the line was 1.3 and happened to round to the floor.

Padding is the layer's documented way to state a block floor (the aim-floor comment in browser/styles/components/surfaces.css). test_coarse_pointer_panel_lists_give_humane_aims already accepts the same shortfall by checking against 43.9. This test now uses that threshold too. It still checks the same behavior: finger-sized rows under touch and compact 24–30px rows under a mouse. No CSS or layout changes.

The test fails on current main (both links measure 43.984375px) and passes with this change.

Closes #5163 — automated triage

…ch floor

Under a coarse pointer a contents link pads its line out to the aim
floor with (--aim-floor - 1lh) / 2. Since #4859 set the outline in
--font-ui (14px at line-height 1.45, 20.3px), layout truncates the line
box and the padding to 1/64px units and each link stands 43.984px
tall, so the exact >= 44 check failed. The padding floor is the
layer's documented way to state a block floor (surfaces.css), and
test_coarse_pointer_panel_lists_give_humane_aims already accepts the
same loss at 43.9. The test now uses that threshold; the user-facing
behavior it protects, a finger-sized row under touch against compact
rows under a mouse, is unchanged.

Closes #5163
@leaf-agent
leaf-agent merged commit 654ceb8 into main Nov 3, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-5163 branch November 3, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Contents links fail the touch target height assertion

1 participant