Skip to content

💅 False positive error for noInteractiveElementToNoninteractiveRole and custom element #2862

Description

@edoardocavazza

Environment information

CLI:
  Version:                      1.7.3
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v18.19.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "yarn/4.1.0"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Linter:
  Recommended:                  true
  All:                          false
  Rules:                        a11y/noRedundantAlt = "warn"
                                a11y/useButtonType = "warn"
                                complexity/noForEach = "off"
                                complexity/useArrowFunction = "warn"
                                complexity/useFlatMap = "warn"
                                complexity/useLiteralKeys = "off"
                                complexity/useOptionalChain = "warn"
                                correctness/useJsxKeyInIterable = "off"
                                performance/noAccumulatingSpread = "warn"
                                performance/noDelete = "warn"
                                style/noInferrableTypes = "warn"
                                style/noNamespace = "off"
                                style/noParameterAssign = "warn"
                                style/noUselessElse = "warn"
                                style/useConst = "warn"
                                style/useImportType = "warn"
                                style/useSelfClosingElements = "warn"
                                style/useSingleCaseStatement = "off"
                                style/useSingleVarDeclarator = "warn"
                                style/useTemplate = "warn"
                                suspicious/noAssignInExpressions = "warn"
                                suspicious/noClassAssign = "off"
                                suspicious/noConfusingLabels = "warn"
                                suspicious/noConsoleLog = "warn"
                                suspicious/noExplicitAny = "warn"

Workspace:
  Open Documents:               0

Rule name

noInteractiveElementToNoninteractiveRole

Playground link

https://biomejs.dev/playground/?code=ZgB1AG4AYwB0AGkAbwBuACAAcgBlAG4AZABlAHIAQwB1AHMAdABvAG0ARQBsAGUAbQBlAG4AdABXAGkAdABoAFIAbwBsAGUAKAApACAAewAKACAAIAByAGUAdAB1AHIAbgAgADwAeAAtAGUAbABlAG0AZQBuAHQACgAgACAAIAAgACAAcgBvAGwAZQA9ACIAZwByAG8AdQBwACIAIAAgACAAIAAgACAACgAgACAAIAAvAD4ACgB9AA%3D%3D

Expected result

Autonomous custom elements should be treated as non-interactive elements.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LinterArea: linterL-JavaScriptLanguage: JavaScript and super languagesS-Bug-confirmedStatus: report has been confirmed as a valid bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions