From 0216528b67db47f32a00e886ef033049041d232a Mon Sep 17 00:00:00 2001 From: replit-agent Date: Fri, 24 Apr 2026 13:10:54 +0000 Subject: [PATCH] fix(fields): make FieldCard keyboard-accessible [Phase 2b] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pays down the accessibility debt left over from Phase 2a. The FieldCard tile in the fields grid was visually migrated to the design-system primitive but kept its legacy onClick on a non-semantic wrapper, leaving the entire grid unreachable by keyboard and undescribed for assistive tech. A real / would have been the cleanest solution but is incompatible with the constraints — Card's `as` prop does not accept `'a'` and the spec forbids touching the Card / Surface API in this PR. Wrapping Card in a would also nest a real + ); diff --git a/frontend/src/pages/Fields/components/__tests__/FieldCard.test.tsx b/frontend/src/pages/Fields/components/__tests__/FieldCard.test.tsx index 4434b70c..c7de893f 100644 --- a/frontend/src/pages/Fields/components/__tests__/FieldCard.test.tsx +++ b/frontend/src/pages/Fields/components/__tests__/FieldCard.test.tsx @@ -75,6 +75,18 @@ describe('FieldCard — primary render', () => { screen.queryByText('7120884600:01:001:0042'), ).not.toBeInTheDocument(); }); + + it('renders the hover-CTA label inside an aria-hidden decorative overlay', () => { + renderCard(); + + // The CTA is no longer a real