mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 04:50:59 +00:00
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:
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))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user