Skip to content

Commit cfd4c86

Browse files
committed
chore: drop temporal audit-phase / PR-number references
1 parent 930ff88 commit cfd4c86

2 files changed

Lines changed: 13 additions & 16 deletions

File tree

tests/audit/no-aria-hidden-on-focusable/peer-parity.js

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ ruleTester.run('audit:no-aria-hidden-on-focusable (gts)', rule, {
113113
errors: [{ messageId: 'noAriaHiddenOnFocusable' }],
114114
},
115115

116-
// === Upstream parity with vue-a11y descendant-focusable check (G5.1) ===
116+
// === Upstream parity with vue-a11y descendant-focusable check ===
117117
// vue-a11y: INVALID when aria-hidden is on an ancestor and a focusable
118-
// descendant exists. Our rule now matches this via hasFocusableDescendant.
118+
// descendant exists. Our rule matches via hasFocusableDescendant.
119119
// Per WAI-ARIA 1.2 §aria-hidden "may receive focus", a focusable
120120
// descendant beneath an aria-hidden ancestor is keyboard-reachable while
121121
// hidden from AT — a keyboard trap.
@@ -126,19 +126,16 @@ ruleTester.run('audit:no-aria-hidden-on-focusable (gts)', rule, {
126126
},
127127

128128
// === DIVERGENCE — `tabindex="-1"` on an inherently focusable element ===
129-
// This is the load-bearing, intentional divergence that PR #19 encodes.
130129
// jsx-a11y: VALID — `<button aria-hidden="true" tabIndex="-1" />` is
131130
// accepted; the author has acknowledged the element is "escorted out"
132131
// of the tab order.
133132
// vue-a11y: VALID — same: `<button tabindex="-1" aria-hidden="true">`
134133
// is accepted.
135-
// Our rule: INVALID. Rationale (see lib/rules/template-no-aria-hidden-on-focusable.js
136-
// lines 54-62): tabindex="-1" still makes the element *programmatically*
137-
// focusable (reachable via `.focus()` and click). Combined with
138-
// aria-hidden="true" this creates a keyboard trap / AT-invisibility
139-
// mismatch. Our rule flags any tabindex attribute on an aria-hidden
140-
// element regardless of value.
141-
// This is the DIVERGENCE the PR is defending.
134+
// Our rule: INVALID. tabindex="-1" still makes the element
135+
// *programmatically* focusable (reachable via `.focus()` and click).
136+
// Combined with aria-hidden="true" this creates a keyboard trap /
137+
// AT-invisibility mismatch. Our rule flags any tabindex attribute on an
138+
// aria-hidden element regardless of value.
142139
{
143140
code: '<template><button aria-hidden="true" tabindex="-1"></button></template>',
144141
output: null,
@@ -150,7 +147,7 @@ ruleTester.run('audit:no-aria-hidden-on-focusable (gts)', rule, {
150147
errors: [{ messageId: 'noAriaHiddenOnFocusable' }],
151148
},
152149

153-
// === DIVERGENCE (extended by G5.1) — tabindex="-1" on a DESCENDANT ===
150+
// === DIVERGENCE — tabindex="-1" on a DESCENDANT ===
154151
// Same rationale as above, applied through hasFocusableDescendant: our
155152
// `isFocusable` treats any tabindex (including "-1") as programmatically
156153
// focusable. vue-a11y considers these VALID (descendant is "escorted out"
@@ -186,7 +183,7 @@ ruleTester.run('audit:no-aria-hidden-on-focusable (gts)', rule, {
186183
// jsx-a11y: has no explicit case for this. Our rule special-cases
187184
// `<input type="hidden">` as non-focusable. Captured in main rule tests.
188185

189-
// === PARITY — vue-a11y descendant-focusable check (G5.1, PR #19 follow-up) ===
186+
// === PARITY — vue-a11y descendant-focusable check ===
190187
// vue-a11y: INVALID when aria-hidden is on an ancestor and a focusable
191188
// descendant exists:
192189
// `<div aria-hidden="true"><button>Submit</button></div>` → flagged
@@ -263,13 +260,13 @@ hbsRuleTester.run('audit:no-aria-hidden-on-focusable (hbs)', rule, {
263260
output: null,
264261
errors: [{ messageId: 'noAriaHiddenOnFocusable' }],
265262
},
266-
// G5.1 parity — aria-hidden ancestor with focusable descendant.
263+
// Parity — aria-hidden ancestor with focusable descendant.
267264
{
268265
code: '<div aria-hidden="true"><button>Submit</button></div>',
269266
output: null,
270267
errors: [{ messageId: 'noAriaHiddenOnAncestorOfFocusable' }],
271268
},
272-
// G5.1 — DIVERGENCE extended: descendant with tabindex="-1".
269+
// DIVERGENCE descendant with tabindex="-1".
273270
{
274271
code: '<div aria-hidden="true"><button tabindex="-1">Some text</button></div>',
275272
output: null,

tests/lib/rules/template-no-aria-hidden-on-focusable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ ruleTester.run('template-no-aria-hidden-on-focusable', rule, {
112112
errors: [{ messageId: 'noAriaHiddenOnFocusable' }],
113113
},
114114

115-
// Descendant-focusable check (G5.1). Per WAI-ARIA 1.2 §aria-hidden
115+
// Descendant-focusable check. Per WAI-ARIA 1.2 §aria-hidden
116116
// "may receive focus" — focusable descendants are keyboard-reachable
117117
// under an aria-hidden ancestor, creating a keyboard trap.
118118
{
@@ -203,7 +203,7 @@ hbsRuleTester.run('template-no-aria-hidden-on-focusable', rule, {
203203
output: null,
204204
errors: [{ messageId: 'noAriaHiddenOnFocusable' }],
205205
},
206-
// Descendant-focusable check (G5.1).
206+
// Descendant-focusable check.
207207
{
208208
code: '<div aria-hidden="true"><button>Close</button></div>',
209209
output: null,

0 commit comments

Comments
 (0)