What version of Oxlint are you using?
latest
What command did you run?
No response
What does your .oxlintrc.json (or oxlint.config.ts) config file look like?
No response
What happened?
Some roles are not detected by prefer-tag-over-role, which are detected by the original rule.
Actual behavior
Only button, link, heading, and checkbox are detected. The following roles are silently ignored:
role value |
Preferred native element |
ESLint detects |
Oxlint detects |
button |
<button> |
✅ |
✅ |
link |
<a> |
✅ |
✅ |
heading |
<h1>–<h6> |
✅ |
✅ |
checkbox |
<input type="checkbox"> |
✅ |
✅ |
listbox |
<select> |
✅ |
❌ |
region |
<section> |
✅ |
❌ |
slider |
<input type="range"> |
✅ |
❌ |
combobox |
<input list> |
✅ |
❌ |
radio |
<input type="radio"> |
✅ |
❌ |
textbox |
<input> / <textarea> |
✅ |
❌ |
Reproduction
refer to playground
References
What version of Oxlint are you using?
latest
What command did you run?
No response
What does your
.oxlintrc.json(oroxlint.config.ts) config file look like?No response
What happened?
Some roles are not detected by
prefer-tag-over-role, which are detected by the original rule.Actual behavior
Only
button,link,heading, andcheckboxare detected. The following roles are silently ignored:rolevaluebutton<button>link<a>heading<h1>–<h6>checkbox<input type="checkbox">listbox<select>region<section>slider<input type="range">combobox<input list>radio<input type="radio">textbox<input>/<textarea>Reproduction
refer to playground
References