Skip to content

Commit e343262

Browse files
committed
docs: address Copilot review wording (PR #33)
1 parent 78f2528 commit e343262

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

docs/rules/template-no-invalid-interactive.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Examples of **correct** code for this rule:
5151
An element opts out of this rule's handler-on-non-interactive check in two cases:
5252

5353
- **`aria-hidden="true"`** (including valueless / empty / `{{true}}` / `{{"true"}}` forms) — the author has explicitly removed the element from the accessibility tree, so a "non-interactive element with handler" is moot; AT users won't encounter it either way. Explicit `aria-hidden="false"` / `{{false}}` still flags.
54-
- **`role="presentation"` / `role="none"`** — the author asserts the element is decorative. We accept `role="presentation"` and `role="none"` (case-insensitive, first-token of a space-separated role list) — a deliberate superset of [jsx-a11y's exact-match `isPresentationRole`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/util/hasPresentationRole.js) for consistency with [WAI-ARIA 1.2 §4.1](https://www.w3.org/TR/wai-aria-1.2/#host_general_role) role-fallback semantics.
54+
- **`role="presentation"` / `role="none"`** — the author asserts the element is decorative. We accept `role="presentation"` and `role="none"` (case-insensitive, first-token of a space-separated role list) — a deliberate superset of [jsx-a11y's exact-match `hasPresentationRole`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/util/hasPresentationRole.js) for consistency with [WAI-ARIA 1.2 §4.1](https://www.w3.org/TR/wai-aria-1.2/#host_general_role) role-fallback semantics.
5555

5656
The valueless `aria-hidden` case (e.g. `<div aria-hidden>`) is [genuinely contested](https://www.scottohara.me/blog/2018/05/05/hidden-vs-none.html) — jsx-a11y, vue-a11y, axe-core, and the WAI-ARIA spec take four different positions on whether it counts as "hidden". This rule leans toward fewer false positives: flagging a handler on an author-decorated element creates friction more often than it catches real bugs.
5757

lib/rules/template-no-invalid-interactive.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ module.exports = {
228228
// Skip elements that opt out of interactive semantics via
229229
// `role="presentation"` / `role="none"` or `aria-hidden`. These are
230230
// the same escape hatches honored by jsx-a11y
231-
// (`hasPresentationRole` + aria-hidden handling in `isInteractiveElement`)
232-
// and vuejs-accessibility.
231+
// (`isPresentationRole` + aria-hidden handling in
232+
// `isHiddenFromScreenReader`) and vuejs-accessibility.
233233
if (hasNonInteractiveEscapeHatch(node)) {
234234
return;
235235
}

0 commit comments

Comments
 (0)