Commit bf50641
authored
chore(site): enable oxlint role-supports-aria-props rule (#29192)
Enables the `role-supports-aria-props` oxlint rule (jsx-a11y), moving it
out of the migration backlog and setting it to `error`.
Stacked on top of #29191. Review that PR first; the base of this PR is
its branch.
## Fixes for the two violations the rule surfaced
- **`Autocomplete.tsx` (select-only trigger button):** removed
`aria-invalid` from the `<button>`. `aria-invalid` is not exposed by the
implicit `button` role, so it had no effect for assistive tech. The
error message linkage via `aria-describedby` (a global attribute) is
kept. The only consumer that sets an invalid state
(`ModelIdentifierField`) uses the `inlineSearch` variant, which renders
an `<input role="combobox">` that still keeps `aria-invalid` (valid
there).
- **`AgentLatency.tsx` (latency popover trigger):** the trigger was a
`<span role="presentation" aria-label="latency">`; `presentation` does
not support `aria-label`, and a presentational role on an interactive
trigger is wrong. Converted it to a real `<button>` with reset styling
so it stays visually identical (inline colored text, no button chrome)
while being a focusable, correctly-labeled control.
## Verification
- `oxlint --deny-warnings`: 0 warnings, 0 errors.
- `biome lint --error-on-warnings` on the changed files: clean.
- `tsc -p .`: clean.
- Storybook visual check of `components/AgentRow --example`: latency
renders as inline colored text (no boxed button) and clicking it still
opens the "Latency" popover.
---
_This PR was generated by Coder Agents on behalf of @jeremyruppel._1 parent a18642a commit bf50641
3 files changed
Lines changed: 4 additions & 5 deletions
File tree
- site
- src
- components/Autocomplete
- modules/resources
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
210 | | - | |
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
378 | 377 | | |
379 | 378 | | |
380 | 379 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
| 46 | + | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
0 commit comments