From 7ee32a142e31d6f53f9b075f495d242ecd3f9202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 17 May 2026 12:58:13 +0200 Subject: [PATCH] a11y(medications): drop sm-size on intake-history pagination buttons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit shadcn Button size="sm" renders at 32 px — below the project's 44 px touch floor adopted in v1.4.34.4. Use the default size with an explicit min-h-11 sm:min-h-9 override so the pagination row stays compact on desktop but clears WCAG 2.5.5 on touch. --- .../medications/__tests__/intake-history-list-v2.test.tsx | 4 ++++ src/components/medications/intake-history-list-v2.tsx | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/medications/__tests__/intake-history-list-v2.test.tsx b/src/components/medications/__tests__/intake-history-list-v2.test.tsx index 283ea1fb4..04ada67d2 100644 --- a/src/components/medications/__tests__/intake-history-list-v2.test.tsx +++ b/src/components/medications/__tests__/intake-history-list-v2.test.tsx @@ -241,6 +241,10 @@ describe(" — sort indicators", () => { ); expect(html).toContain("Previous"); expect(html).toContain("Next"); + // a11y: pagination buttons clear the 44 px mobile touch floor and + // collapse to 36 px from sm+ so the row stays compact on desktop. + expect(html).toContain("min-h-11"); + expect(html).toContain("sm:min-h-9"); }); it("hides pagination when total ≤ pageSize", () => { diff --git a/src/components/medications/intake-history-list-v2.tsx b/src/components/medications/intake-history-list-v2.tsx index 58ca0e2a5..462955b74 100644 --- a/src/components/medications/intake-history-list-v2.tsx +++ b/src/components/medications/intake-history-list-v2.tsx @@ -252,7 +252,7 @@ export function IntakeHistoryListV2({