Phone touch targets under 44 px: bar icons, theme choices, swatches, switches, date headers #346

Closed
opened 2026-10-14 19:16:36 +00:00 by kayg · 2 comments
Owner

TASTE.md says: "hit area at least 44 on touch". These are the real hit areas on a 390 px phone (I probed with elementFromPoint around each centre, so invisible padding counts), plus the drawn size.

App

Control Drawn Hit area
Bar icons (Insert, Style, Info, Markdown) 36 x 36 about 39 x 43, 4 px apart
"New note" pill 72 x 36 at least 58 x 35
Back ("All notes", "Calternal") 104 x 40 at least 58 x 39
Filter field 316 x 38 about 58 x 37 tall
Date group headers ("Today, show the exact date") 49 x 18 about 49 x 17
Theme segments (Settings) 30 tall about 33 tall
Accent swatches 40 x 40 about 39 x 39
Switches (Photos from Unsplash) 42 x 25 about 49 x 43

Mockup, Settings on a phone: squish switch 42 x 25, "Install" 38 x 20, small "Sign out" 28 tall, Rename and Remove 32 x 32, close "x" 36 x 36, theme segments 34 tall. Mockup note: "Linked from 2 notes" chip 24 tall, "Link" 26 tall, picture buttons (Card, Large, Copy, More) 32 to 34.

Suggested fix: one shared rule for touch: every control gets ::before { inset: -Npx } so its hit area reaches 44 x 44 without moving the art (bar icons need 4 more px of width; the date headers and Filter need real extra height). Add a phone e2e that walks all visible buttons and fails under 44.

Found in kayg's overnight UI/UX hunt (#174). App = apps/web at train commit 2ea759c, run locally against the real server with a development user; mockup = https://preview.calternal.cloud.

TASTE.md says: "hit area at least 44 on touch". These are the real hit areas on a 390 px phone (I probed with `elementFromPoint` around each centre, so invisible padding counts), plus the drawn size. **App** | Control | Drawn | Hit area | |---|---|---| | Bar icons (Insert, Style, Info, Markdown) | 36 x 36 | about 39 x 43, 4 px apart | | "New note" pill | 72 x 36 | at least 58 x 35 | | Back ("All notes", "Calternal") | 104 x 40 | at least 58 x 39 | | Filter field | 316 x 38 | about 58 x 37 tall | | Date group headers ("Today, show the exact date") | 49 x 18 | about 49 x 17 | | Theme segments (Settings) | 30 tall | about 33 tall | | Accent swatches | 40 x 40 | about 39 x 39 | | Switches (Photos from Unsplash) | 42 x 25 | about 49 x 43 | **Mockup, Settings on a phone:** squish switch 42 x 25, "Install" 38 x 20, small "Sign out" 28 tall, Rename and Remove 32 x 32, close "x" 36 x 36, theme segments 34 tall. **Mockup note:** "Linked from 2 notes" chip 24 tall, "Link" 26 tall, picture buttons (Card, Large, Copy, More) 32 to 34. **Suggested fix:** one shared rule for touch: every control gets `::before { inset: -Npx }` so its hit area reaches 44 x 44 without moving the art (bar icons need 4 more px of width; the date headers and Filter need real extra height). Add a phone e2e that walks all visible buttons and fails under 44. Found in kayg's overnight UI/UX hunt (#174). App = `apps/web` at train commit 2ea759c, run locally against the real server with a development user; mockup = https://preview.calternal.cloud.
Author
Owner

Screenshots (all taken tonight, Chromium unless it says WebKit):

390: bar icons are 36 px drawn
trip-390-light.png

390 dark Settings: theme segments, swatches and switch
settings-390-dark.png

Mockup Settings, 390 dark
set-390-dark.png

Screenshots (all taken tonight, Chromium unless it says WebKit): **390: bar icons are 36 px drawn** ![trip-390-light.png](https://git.kayg.org/attachments/09474180-7127-497e-a1c4-6f421c8a51c2) **390 dark Settings: theme segments, swatches and switch** ![settings-390-dark.png](https://git.kayg.org/attachments/be169d7b-2f61-4246-8091-03de1c8d580e) **Mockup Settings, 390 dark** ![set-390-dark.png](https://git.kayg.org/attachments/d21e5054-a199-4323-8a5b-bb3679725e16)
Author
Owner

Fixed in PR #371 for the app (not the mockup). Hit areas measured with elementFromPoint around each centre, touch emulation, 320 and 390.

Control Hit area before After
Bar icons (Insert, Style, Info, marks, link) 40 x 44 (38 at 320) 44 x 44
"New" pill 72 x 36 72 x 44
Kind button (Text) 66 x 30 66 x 44
Bar tabs 52 x 40 52 x 44
Back (All notes, Calternal) 40 tall 44 tall
Filter field 38 tall 44 tall
Date group headers 49 x 18 49 x 44 (header is 44 px tall)
Theme segments (Settings) 79 to 58 x 34, Dark 35 wide at 320 all at least 44 x 44
Accent swatches 40 x 40 at least 56 x 44, with names
Switch already 44 44
Sign out, Add a passkey, Install, Update, close 34 / 30 tall 44 x 44 (shared .reach class)

Art is unchanged: icons stay 36 px with 8 px gaps (4 px of reach each side), the rest grow with ::after. Desktop (fine pointer) is untouched. The new phone-targets.spec.ts walks every bar target in the note tools, text and block bars, and every Settings button, at 320, 360, 375 and 390, in Chromium and WebKit, and fails under 44 px. Because the text and block bars cannot hold 44 px targets in one line at 320, they are two lines on a phone (see #343).

Left for later: the mockup items in this issue; the Style sheet's own controls were not part of the list and were not changed.

Note tools at 320, light

before: b-tools-320-light.png
after: a-tools-320-light.png

Note tools at 390, dark

before: b-tools-390-dark.png
after: a-tools-390-dark.png

Text bar at 320, light

before: b-text-320-light.png
after: a-text-320-light.png

Block bar at 390, dark

before: b-block-390-dark.png
after: a-block-390-dark.png

Settings at 390, dark

before: b-settings-390-dark.png
after: a-settings-390-dark.png

Fixed in PR #371 for the app (not the mockup). Hit areas measured with `elementFromPoint` around each centre, touch emulation, 320 and 390. | Control | Hit area before | After | |---|---|---| | Bar icons (Insert, Style, Info, marks, link) | 40 x 44 (38 at 320) | 44 x 44 | | "New" pill | 72 x 36 | 72 x 44 | | Kind button (Text) | 66 x 30 | 66 x 44 | | Bar tabs | 52 x 40 | 52 x 44 | | Back (All notes, Calternal) | 40 tall | 44 tall | | Filter field | 38 tall | 44 tall | | Date group headers | 49 x 18 | 49 x 44 (header is 44 px tall) | | Theme segments (Settings) | 79 to 58 x 34, Dark 35 wide at 320 | all at least 44 x 44 | | Accent swatches | 40 x 40 | at least 56 x 44, with names | | Switch | already 44 | 44 | | Sign out, Add a passkey, Install, Update, close | 34 / 30 tall | 44 x 44 (shared `.reach` class) | Art is unchanged: icons stay 36 px with 8 px gaps (4 px of reach each side), the rest grow with `::after`. Desktop (fine pointer) is untouched. The new `phone-targets.spec.ts` walks every bar target in the note tools, text and block bars, and every Settings button, at 320, 360, 375 and 390, in Chromium and WebKit, and fails under 44 px. Because the text and block bars cannot hold 44 px targets in one line at 320, they are two lines on a phone (see #343). Left for later: the mockup items in this issue; the Style sheet's own controls were not part of the list and were not changed. **Note tools at 320, light** before: ![b-tools-320-light.png](https://git.kayg.org/attachments/ac33d573-a853-42d6-8ddd-75a6647f4e73) after: ![a-tools-320-light.png](https://git.kayg.org/attachments/626d05c3-1053-431a-8b69-f4a6801197df) **Note tools at 390, dark** before: ![b-tools-390-dark.png](https://git.kayg.org/attachments/8469a158-9a96-4f00-a26b-13720f6adbca) after: ![a-tools-390-dark.png](https://git.kayg.org/attachments/1908f8f2-5d55-40ad-bfe1-423153146f79) **Text bar at 320, light** before: ![b-text-320-light.png](https://git.kayg.org/attachments/704ccae2-deed-4ae5-a2d9-82cde1c7e65b) after: ![a-text-320-light.png](https://git.kayg.org/attachments/02b98edf-30e5-485c-97de-c9fff268a803) **Block bar at 390, dark** before: ![b-block-390-dark.png](https://git.kayg.org/attachments/074a71d0-9ac8-4cdb-b92e-8a52e4ae8ac6) after: ![a-block-390-dark.png](https://git.kayg.org/attachments/8a999f6d-8015-462b-9c2a-874acf42e143) **Settings at 390, dark** before: ![b-settings-390-dark.png](https://git.kayg.org/attachments/fb856196-6f9c-4303-b68b-265502634d15) after: ![a-settings-390-dark.png](https://git.kayg.org/attachments/adc6df50-4db9-40de-9adc-79e6db20336b)
kayg closed this issue 2026-10-14 21:47:52 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#346
No description provided.