Several clickable controls in the report UI are plain divs and spans with an onClick, so they can't be focused or activated from the keyboard, and screen readers don't announce them as controls.
Three I ran into:
packages/html-reporter/src/labels.tsx, the label chips
packages/trace-viewer/src/ui/tag.tsx, the tag chips
packages/web/src/components/gridView.tsx, sortable column headers
So sorting a results table or filtering by a label is mouse only.
What I'd do is use a real <button> wherever there's an onClick, with all: unset so nothing changes visually, plus a :focus-visible outline. The label chips are the awkward one, since some of them render inside an anchor, so those would only become a button when there's an onClick and no href.
I had PRs up for these before I'd read the contributing guide properly (#42471 and #42472, both closed). Happy to redo them if you want this fixed, or to drop it.
Several clickable controls in the report UI are plain divs and spans with an
onClick, so they can't be focused or activated from the keyboard, and screen readers don't announce them as controls.Three I ran into:
packages/html-reporter/src/labels.tsx, the label chipspackages/trace-viewer/src/ui/tag.tsx, the tag chipspackages/web/src/components/gridView.tsx, sortable column headersSo sorting a results table or filtering by a label is mouse only.
What I'd do is use a real
<button>wherever there's anonClick, withall: unsetso nothing changes visually, plus a:focus-visibleoutline. The label chips are the awkward one, since some of them render inside an anchor, so those would only become a button when there's anonClickand nohref.I had PRs up for these before I'd read the contributing guide properly (#42471 and #42472, both closed). Happy to redo them if you want this fixed, or to drop it.