Skip to content

linter: jsx-a11y/role-supports-aria-props incorrect for role=combobox and aria-haspopup attribute #21719

@jackstevenson

Description

@jackstevenson

What version of Oxlint are you using?

1.61.0

What command did you run?

oxlint

What does your .oxlintrc.json (or oxlint.config.ts) config file look like?

{
  "plugins": ["jsx-a11y"],
  "categories": {
    "correctness": "off"
  },
  "rules": {
    "jsx-a11y/role-supports-aria-props": "error"
  }
}

What happened?

Oxlint incorrectly reports the error:

The attribute `aria-haspopup` is not supported by the role `combobox`.

From MDN

Comboboxes have an implicit aria-haspopup value of listbox, so including this attribute is optional if the popup is a listbox. If the combobox popup element is a tree, grid, or dialog (anything other than a listbox), the aria-haspopup attribute is required. The value of aria-haspopup must be either the tree, grid, dialog, or listbox role. Note that for this property, true means menu, so make sure that the value corresponds to the role of the popup, not a Boolean value.

Playground repro

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