a11y(medications): drop sm-size on intake-history pagination buttons

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.
This commit is contained in:
Marc-André Bombeck committed 2026-05-17 12:58:13 +02:00
1 parent 00cf8d7a8c
commit 7ee32a142e
2 files changed
+6 -2

No files matched your search

@@ -241,6 +241,10 @@ describe("<IntakeHistoryListV2> — 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", () => {
@@ -252,7 +252,7 @@ export function IntakeHistoryListV2({
<Button
type="button"
variant="outline"
size="sm"
className="min-h-11 sm:min-h-9"
onClick={() => setPage((p) => Math.max(0, p - 1))}
disabled={page === 0}
>
@@ -261,7 +261,7 @@ export function IntakeHistoryListV2({
<Button
type="button"
variant="outline"
size="sm"
className="min-h-11 sm:min-h-9"
onClick={() =>
setPage((p) => Math.min(totalPages - 1, p + 1))
}