-
Notifications
You must be signed in to change notification settings - Fork 656
📎 A11y Rules: Support aria-roles #3640
Comments
…eKeyWithClickEvents` Interactive elements like `button`, `a`, `input` etc. don't need key events as they are supported by the browser. This is a simplified implementation and the rule should also consider if the element is hidden for screen readers but that's out of the scope of this fix. See #3640 ## Test Plan I added a new test that verifies that `button` no longer gets flagged.
…eKeyWithClickEvents` Interactive elements like `button`, `a`, `input` etc. don't need key events as they are supported by the browser. This is a simplified implementation and the rule should also consider if the element is hidden for screen readers but that's out of the scope of this fix. See #3640 ## Test Plan I added a new test that verifies that `button` no longer gets flagged.
👋 @rome/staff please triage this issue by adding one of the following labels: |
Closing, as completed by #3832 A complete list of rules and properties will be added as part of |
What about existing rules like See TODO here tools/crates/rome_js_analyze/src/analyzers/a11y/use_key_with_click_events.rs Lines 70 to 72 in 2655264
|
@MichaReiser I added I checkbox in the umbrella as a separate task |
I see. Would you mind linking to the umbrella (and then close this issue again :)) |
There's task in the umbrella #3739 |
Description
Aria roles allow specifying the type of an element. E.g.
<div role="button">
changes the "role" of the div to a button.Proper support for aria roles is necessary to correctly implement many of the accessibility rules. For example, the
useKeyWithClickEvent
rule must know if the element is an interactive element and, if so, not emit an errorhttps://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/2b133ecc0ba1b882ca06f0813b1afcdf64195757/src/util/isInteractiveElement.js
Requires metadata similar to
aria-query
The text was updated successfully, but these errors were encountered: