Skip to content

Ensure shortlist toggle meets touch target size - #122

Merged
TMHSDigital merged 2 commits into
TMHSDigital:mainfrom
jay23606:pr-go/102-a11y-mobile-the-shortlist-toggle-in-card
Oct 22, 2026
Merged

TMHSDigital merged 2 commits into
TMHSDigital:mainfrom
jay23606:pr-go/102-a11y-mobile-the-shortlist-toggle-in-card

Conversation

@jay23606

Copy link
Copy Markdown
Contributor

Bug

On touch screens, the shortlist button in a card lacked the enlarged hit area already applied to the in-card links.

Change

Give the button a 44px minimum height and check that padding is cancelled by matching negative margins so the card layout does not shift.

Testing

node site/shortlist-touch-target.test.mjs failed against the base CSS with the missing button selector assertion and passed with the fix.

Regression test: fails on base twice (/coarse-pointer styles must include .entry-links button/), passes on fix twice (node site/shortlist-touch-target.test.mjs)

Fixes #102

@jay23606

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

…d lib.test.mjs only

The file was not referenced by npm test or ci.yml, so it never ran in CI,
and the repo keeps behaviour tests in the two existing files rather than
regex checks on the stylesheet. The CSS fix stays as is: measured under a
390px touch viewport, the shortlist toggle grows from 19px to 45px tall
with no change to the card height.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@TMHSDigital

Copy link
Copy Markdown
Owner

Thanks. The CSS change is right: measured under a 390px touch viewport, the shortlist toggle goes from 19px to 45px tall with no change to the card height (the min-height line is redundant but harmless). One request: please remove site/shortlist-touch-target.test.mjs. It is not wired into npm test or ci.yml so it never runs, and this repo keeps its tests in checks.test.mjs and lib.test.mjs rather than regex checks on the stylesheet. I have set the PR body to reference #102 so the issue closes on merge. If I do not hear back I will merge and drop the file in a follow-up.

@TMHSDigital
TMHSDigital merged commit 748e11c into TMHSDigital:main Oct 22, 2026
2 checks passed
TMHSDigital added a commit that referenced this pull request Oct 22, 2026
…fted PRs (#123)

Two gaps surfaced by PRs #78 (publisher-submitted entry) and #122
(automated PR with an unwired test file). CONTRIBUTING gains a section on
each; the PR template gains one checkbox covering both.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
@jay23606
jay23606 deleted the pr-go/102-a11y-mobile-the-shortlist-toggle-in-card branch October 22, 2026 19:51
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.

a11y/mobile: the shortlist toggle in cards is a ~13 px touch target inside the card-wide link

2 participants