Skip to content

Commit 7911cf5

Browse files
committed
docs(template-no-empty-headings): correct WAI-ARIA section reference
The rule and test comments cited "WAI-ARIA 1.2 §6.6 aria-hidden value table". §6.6 is "Taxonomy of WAI-ARIA States and Properties" and only categorizes attributes; the aria-hidden value table lives in §6.7 "Definitions of States and Properties". Use the bare #aria-hidden anchor, which is unambiguous.
1 parent ceaf0cf commit 7911cf5

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

lib/rules/template-no-empty-headings.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ const { getStaticAttrValue } = require('../utils/static-attr-value');
22

33
const HEADINGS = new Set(['h1', 'h2', 'h3', 'h4', 'h5', 'h6']);
44

5-
// Aligned with WAI-ARIA 1.2 §6.6 aria-hidden value table: only an explicit
6-
// "true" (ASCII case-insensitive, whitespace-trimmed) hides the element.
5+
// Aligned with the WAI-ARIA 1.2 [`aria-hidden`](https://www.w3.org/TR/wai-aria-1.2/#aria-hidden)
6+
// value table (`true | false | undefined (default)`): treat only an explicit
7+
// "true" (ASCII case-insensitive, whitespace-trimmed) as hiding the element.
78
// Valueless `<h1 aria-hidden>`, empty-string `aria-hidden=""`, and
89
// `aria-hidden="false"` all resolve to the default `undefined` / explicit
910
// false — so the empty-content check still applies. All shape-unwrapping

tests/lib/rules/template-no-empty-headings.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ ruleTester.run('template-no-empty-headings', rule, {
168168
output: null,
169169
errors: [{ messageId: 'emptyHeading' }],
170170
},
171-
// Per WAI-ARIA 1.2 §6.6 aria-hidden value table: valueless /
171+
// Per the WAI-ARIA 1.2 `aria-hidden` value table
172+
// (https://www.w3.org/TR/wai-aria-1.2/#aria-hidden): valueless /
172173
// empty-string `aria-hidden` resolves to the default `undefined`,
173174
// not `true`. Empty headings with these forms still flag.
174175
{

0 commit comments

Comments
 (0)