Skip to content

linter: prefer-tag-over-role — Missing support for several roles #21910

@mehm8128

Description

@mehm8128

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions