test(e2e): require the button tag on the /resources Select waiver

The target-size waiver matched a bare `aria-label="Select `, so any control on
the page labelled "Select …" — not just the file-manager row-select buttons —
was waived. axe emits those buttons as `button[aria-label="Select <name>"]` with
no parent path, so the label is the only anchor available; requiring the button
tag at least stops a future non-button "Select …" control from slipping the
rule. /resources a11y stays green; a div/anchor "Select" is now caught.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Sergey Kozyrenko
2026-07-25 04:04:00 +07:00
co-authored by Claude Opus 4.8
parent 3746029825
commit bdce2bfb04
+5 -3
View File
@@ -152,9 +152,11 @@ export const ROUTE_MANIFEST: RouteManifestEntry[] = [
// target floor — widening them is a density decision for the file manager.
a11yWaivers: [
{ rule: 'color-contrast', target: /text-muted-foreground\\?\/80/ },
// `.rounded` unanchored would also match every rounded-* utility, so a
// future under-sized control anywhere on the page would be waived too.
{ rule: 'target-size', target: /\.rounded(?![-\w])|aria-label="Select / },
// `.rounded` is anchored with a boundary so it can't match every rounded-* utility. axe
// emits the row-select buttons as a bare `button[aria-label="Select <name>"]` with no
// parent path, so the label is the only available anchor — require the button tag at
// least, rather than a bare `aria-label="Select ` that would also waive a non-button.
{ rule: 'target-size', target: /\.rounded(?![-\w])|button\[aria-label="Select / },
],
cassette: resourcesCassette,
path: routes.resources,