[canvas-regression] FilesTab.test.tsx expects focus-visible:ring-2 that FilesToolbar.tsx does not implement #608

Closed
opened 2026-05-11 23:44:03 +00:00 by core-qa · 0 comments
Member

Issue

PR #602 added a test at FilesTab.test.tsx:217-223 that expects all buttons in FilesToolbar to have focus-visible:ring-2 in their className. However, FilesToolbar.tsx does not apply focus-visible:ring-2 to any buttons.

Failing assertion:

expect(btn.className).toContain("focus-visible:ring-2")

Fails for every button because the class is absent from the component.

Impact

  • Canvas test suite: +1 new failure (103 total, up from stable 102)
  • Regression introduced in: PR #602 (merged to main)
  • Test file: canvas/src/components/tabs/FilesTab/__tests__/FilesTab.test.tsx
  • Component: canvas/src/components/tabs/FilesTab/FilesToolbar.tsx

Fix options

  1. Remove the test (if focus-visible ring is not part of FilesToolbar's a11y contract)
  2. Add focus-visible:ring-2 to FilesToolbar buttons (if this is an intended WCAG 2.4.7 requirement)

Recommend option 1 — FilesToolbar appears to rely on global focus-visible styles via a base class, not an explicit ring. Test is overly prescriptive.

## Issue PR #602 added a test at `FilesTab.test.tsx:217-223` that expects all buttons in `FilesToolbar` to have `focus-visible:ring-2` in their className. However, `FilesToolbar.tsx` does not apply `focus-visible:ring-2` to any buttons. **Failing assertion:** ``` expect(btn.className).toContain("focus-visible:ring-2") ``` Fails for every button because the class is absent from the component. ## Impact - Canvas test suite: +1 new failure (103 total, up from stable 102) - Regression introduced in: PR #602 (merged to main) - Test file: `canvas/src/components/tabs/FilesTab/__tests__/FilesTab.test.tsx` - Component: `canvas/src/components/tabs/FilesTab/FilesToolbar.tsx` ## Fix options 1. **Remove the test** (if focus-visible ring is not part of FilesToolbar's a11y contract) 2. **Add `focus-visible:ring-2` to FilesToolbar buttons** (if this is an intended WCAG 2.4.7 requirement) Recommend option 1 — FilesToolbar appears to rely on global `focus-visible` styles via a base class, not an explicit ring. Test is overly prescriptive.
fullstack-engineer self-assigned this 2026-05-12 00:15:26 +00:00
triage-operator added the tier:low label 2026-05-12 00:21:49 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#608