Skip to content
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

💅 useAriaPropsSupportedByRole should not report an error when "role" is dynamic #4842

Open
1 task done
simon-paris opened this issue Jan 6, 2025 · 0 comments
Open
1 task done
Labels
S-Needs triage Status: this issue needs to be triaged

Comments

@simon-paris
Copy link
Contributor

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:           "v22.12.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "yarn/1.22.22"

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

Linter:
  JavaScript enabled:           true
  JSON enabled:                 true
  CSS enabled:                  true
  GraphQL enabled:              false
  Recommended:                  true
  All:                          false
  Enabled rules:
  suspicious/noCatchAssign
  suspicious/noUnsafeNegation
  suspicious/useNamespaceKeyword
  a11y/useValidLang
  complexity/noUselessEmptyExport
  complexity/noMultipleSpacesInRegularExpressionLiterals
  suspicious/useValidTypeof
  a11y/useValidAriaRole
  correctness/noConstantCondition
  a11y/useAriaActivedescendantWithTabindex
  suspicious/noDuplicateParameters
  suspicious/noDuplicateSelectorsKeyframeBlock
  complexity/noEmptyTypeParameters
  correctness/noConstructorReturn
  style/useSelfClosingElements
  correctness/noUnknownProperty
  style/useTemplate
  correctness/noUnusedLabels
  complexity/noUselessTernary
  correctness/noUnreachableSuper
  suspicious/noCompareNegZero
  correctness/noSwitchDeclarations
  correctness/noUnsafeOptionalChaining
  correctness/noConstAssign
  suspicious/noControlCharactersInRegex
  complexity/noUselessTypeConstraint
  style/noVar
  suspicious/noDoubleEquals
  suspicious/noRedundantUseStrict
  style/useLiteralEnumMembers
  suspicious/noGlobalIsNan
  suspicious/noEmptyInterface
  suspicious/noMisleadingCharacterClass
  correctness/noPrecisionLoss
  suspicious/noRedeclare
  correctness/noStringCaseMismatch
  correctness/noSetterReturn
  correctness/noInvalidConstructorSuper
  suspicious/noDuplicateObjectKeys
  suspicious/noUnsafeDeclarationMerging
  correctness/noUnreachable
  complexity/noUselessThisAlias
  complexity/noThisInStatic
  correctness/noInnerDeclarations
  suspicious/noDuplicateCase
  style/noParameterAssign
  a11y/useValidAnchor
  correctness/noSelfAssign
  correctness/noInvalidBuiltinInstantiation
  style/useShorthandFunctionType
  suspicious/noShadowRestrictedNames
  correctness/noInvalidDirectionInLinearGradient
  suspicious/noImportantInKeyframe
  complexity/noUselessLabel
  complexity/noUselessCatch
  correctness/noUnsafeFinally
  a11y/useAriaPropsForRole
  correctness/noNonoctalDecimalEscape
  style/useEnumInitializers
  a11y/useHtmlLang
  complexity/noStaticOnlyClass
  style/useWhile
  style/noInferrableTypes
  style/useNumericLiterals
  complexity/useSimpleNumberKeys
  suspicious/noImportAssign
  a11y/noInteractiveElementToNoninteractiveRole
  suspicious/noLabelVar
  correctness/noUnnecessaryContinue
  suspicious/noApproximativeNumericConstant
  correctness/noGlobalObjectCalls
  a11y/useAltText
  correctness/noEmptyCharacterClassInRegex
  correctness/noUnknownUnit
  suspicious/noSparseArray
  a11y/useIframeTitle
  suspicious/noPrototypeBuiltins
  correctness/noVoidElementsWithChildren
  suspicious/noSuspiciousSemicolonInJsx
  style/useAsConstAssertion
  suspicious/noDebugger
  style/useExportType
  complexity/noUselessLoneBlockStatements
  style/noArguments
  a11y/useValidAriaValues
  suspicious/noGlobalAssign
  suspicious/noCommentText
  correctness/noUnmatchableAnbSelector
  suspicious/noMisleadingInstantiator
  suspicious/noThenProperty
  suspicious/noDuplicateJsxProps
  suspicious/useGetterReturn
  a11y/noPositiveTabindex
  correctness/noEmptyPattern
  security/noDangerouslySetInnerHtmlWithChildren
  suspicious/noExtraNonNullAssertion
  suspicious/noShorthandPropertyOverrides
  correctness/noRenderReturnValue
  security/noGlobalEval
  style/useConst
  a11y/noRedundantRoles
  complexity/useFlatMap
  correctness/useIsNan
  suspicious/noGlobalIsFinite
  suspicious/noSelfCompare
  suspicious/noAsyncPromiseExecutor
  suspicious/noDuplicateFontNames
  style/useNodejsImportProtocol
  a11y/noDistractingElements
  complexity/noWith
  nursery/useStrictMode
  complexity/noExtraBooleanCast
  suspicious/noDuplicateClassMembers
  a11y/useValidAriaProps
  a11y/noRedundantAlt
  correctness/noChildrenProp
  correctness/noUnknownFunction
  correctness/noInvalidPositionAtImportRule
  suspicious/noConfusingLabels
  suspicious/noConfusingVoidType
  suspicious/noFocusedTests
  a11y/noAriaUnsupportedElements
  correctness/noInvalidGridAreas
  correctness/noFlatMapIdentity
  a11y/noBlankTarget
  a11y/useHeadingContent
  correctness/useValidForDirection
  correctness/noVoidTypeReturn
  correctness/noInvalidUseBeforeDeclaration
  a11y/noAriaHiddenOnFocusable
  a11y/useGenericFontNames
  a11y/useAnchorContent
  complexity/noUselessRename
  complexity/noUselessConstructor
  a11y/noAccessKey
  style/useExponentiationOperator
  nursery/useAriaPropsSupportedByRole
  suspicious/noExportsInTest
  a11y/noNoninteractiveElementToInteractiveRole
  style/noCommaOperator
  suspicious/noDuplicateAtImportRules
  suspicious/useIsArray
  a11y/noHeaderScope
  complexity/noUselessFragments
  suspicious/noMisrefactoredShorthandAssign
  suspicious/noEmptyBlock
  suspicious/noClassAssign
  suspicious/noFunctionAssign

Workspace:
  Open Documents:               0

Rule name

useAriaPropsSupportedByRole

Playground link

https://biomejs.dev/playground/?lintRules=all&files.main.tsx=YwBvAG4AcwB0ACAAcgBvAGwAZQAgAD0AIAAiAGcAcgBvAHUAcAAiADsACgBjAG8AbgBzAHQAIABfAGUAbAAgAD0AIAA8AGQAaQB2ACAAcgBvAGwAZQA9AHsAcgBvAGwAZQB9ACAAYQByAGkAYQAtAGwAYQBiAGUAbAA9ACIASABlAGwAbABvACIALwA%2BADsACgA%3D

Expected result

It should not claim that any attributes are unsupported by the role, because it doesn't know what the role is.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@simon-paris simon-paris added the S-Needs triage Status: this issue needs to be triaged label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-Needs triage Status: this issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant