Skip to content

Commit fbf4c1b

Browse files
johanrdCopilot
andauthored
Update lib/rules/template-no-empty-headings.js
Co-authored-by: Copilot <[email protected]>
1 parent 28373ea commit fbf4c1b

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
const HEADINGS = new Set(['h1', 'h2', 'h3', 'h4', 'h5', 'h6']);
22

33
// aria-hidden semantics for valueless / empty / "false" are genuinely
4-
// contested — four ecosystem positions exist (jsx-a11y / vue-a11y / axe /
5-
// WAI-ARIA spec), see PR body. This rule leans toward FEWER false positives:
6-
// when the author has written `aria-hidden` in any form that could plausibly
7-
// mean "hide this", we exempt the heading from the empty-content check. The
8-
// downside (missing some genuinely-empty headings) is preferable to flagging
9-
// correctly-authored headings the developer intentionally decorated.
4+
// contested across common accessibility tooling and spec interpretations.
5+
// For this rule, we prefer FEWER false positives: when the author has written
6+
// `aria-hidden` in any form that could plausibly mean "hide this", we exempt
7+
// the heading from the empty-content check. The downside (missing some
8+
// genuinely-empty headings) is preferable to flagging correctly-authored
9+
// headings the developer intentionally decorated. See
10+
// docs/rules/template-no-empty-headings.md for the rule-level rationale.
1011
//
1112
// Truthy:
1213
// - valueless attr (`<h1 aria-hidden>`) — default-undefined per spec, but

0 commit comments

Comments
 (0)