Skip to content

Commit 6030630

Browse files
committed
docs(template-anchor-has-content): clarify valueless aria-hidden is not-hidden (Copilot review)
1 parent e9d683e commit 6030630

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

docs/rules/template-anchor-has-content.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ For each in-scope anchor the rule computes whether the element exposes an access
1515
- A non-empty `aria-label`, `aria-labelledby`, or `title` on the anchor itself is an accessible name (any non-static / dynamic value is trusted).
1616
- Static text (including text nested inside child elements) is an accessible name.
1717
- `<img alt="...">` children contribute their `alt` to the name.
18-
- `aria-hidden` children contribute nothing, even if they contain text or `alt`.
18+
- Children with `aria-hidden="true"` (or `{{true}}`) contribute nothing, even if they contain text or `alt`. Valueless / empty-string `aria-hidden` resolves to the default `undefined` per the WAI-ARIA value table and is treated as not-hidden — those children still contribute.
1919
- Dynamic content (`{{@foo}}`, `{{this.foo}}`, `{{#if ...}}`) is treated as opaque: the rule does not flag the anchor because it cannot know what will render.
2020

2121
## Examples
@@ -30,6 +30,7 @@ This rule **allows** the following:
3030
<a href="/x" title="Open menu" />
3131
<a href="/x"><img alt="Search" /></a>
3232
<a href="/x">{{@label}}</a>
33+
<a href="/x"><span aria-hidden>Profile</span></a>
3334
<Link href="/x" />
3435
</template>
3536
```

0 commit comments

Comments
 (0)