Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 a11y/noNoninteractiveElementToInteractiveRole doesn't support rule options #4635

Closed
1 task done
Excalibaard opened this issue Nov 25, 2024 · 0 comments
Closed
1 task done
Labels
S-Needs triage Status: this issue needs to be triaged

Comments

@Excalibaard
Copy link

Excalibaard commented Nov 25, 2024

Environment information

CLI:
  Version:                      1.9.4
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.12.2"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "pnpm/9.14.2"

Biome Configuration:
  Error:                        options has an incorrect type, expected no value, but received an object.
  Status:                       Loaded with errors
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

What happened?

  1. Set "linter.rules.recommended: false" in the Biome config JSON.
  2. Set the following value for "linter.rules.a11y.noNoninteractiveElementToInteractiveRole":
{
  "level": "error",
  "options": {
    "ul": ["listbox"]
  }
}
  1. The Biome config is considered invalid, because property 'options' is not allowed and options has an incorrect type, expected no value, but received an object.

Expected result

I expect to be able set options for the rule, as described by the rule source.

In this case, specifically to whitelist the "listbox" role on non-interactive ul elements, which follows ARIA's listbox example implementation, and is part of the recommended options for this rule in the rule source.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@Excalibaard Excalibaard added the S-Needs triage Status: this issue needs to be triaged label Nov 25, 2024
@Excalibaard Excalibaard changed the title 🐛 lint/a11y/noNoninteractiveElementToInteractiveRole doesn't support rule options 🐛 a11y/noNoninteractiveElementToInteractiveRole doesn't support rule options Nov 25, 2024
@biomejs biomejs locked and limited conversation to collaborators Nov 26, 2024
@ematipico ematipico converted this issue into discussion #4641 Nov 26, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
S-Needs triage Status: this issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant