You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 09b51fc
Browse filesBrowse the repository at this point in the historyBrowse files
Implement the ACT label in name algorithm for 2ee8b8 (#463)
Upstream rewrote ACT rule 2ee8b8 "Visible label is part of accessible
name", growing it from 11 to 32 test cases and replacing the informal
check with a formal label in name algorithm. CI re-syncs testcases.json
from the ACT feed on every run, so every open PR started failing the
same nine cases.
Replace the case-insensitive substring test with the specified
algorithm: tokenize both sides (strip parenthesised asides, case fold,
NFKD, reduce non-letter/non-digit characters to whitespace, split into
words) and check that the label is a contiguous subsequence of the name.
Compute visible inner text per the ACT glossary, which fixes three
bugs in the old text walk: whitespace was trimmed at every recursion
level, aria-hidden descendants were excluded even though they are still
rendered, and CSS-hidden content was not excluded at all.
The ACT tests parse fixtures with DOMParser, so the document has no
browsing context and neither getComputedStyle nor stylesheets are
available. Resolve the few properties the rule needs from computed
styles when there is a view, and otherwise from <style> text plus
inline attributes.
2ee8b8 goes from 10/11 to 31/32; the remaining case needs icon font
rendering and stays skipped.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@@ -43,7 +43,7 @@ The W3C [ACT implementations report](https://www.w3.org/WAI/standards-guidelines
43
43
| ✅ |[6cfa84](https://act-rules.github.io/rules/6cfa84) — Element with aria-hidden has no content in sequential focus navigation | 4.1.2 |`aria-hidden-focus`| 11 / 12 |
44
44
| ✅ |[de46e4](https://act-rules.github.io/rules/de46e4) — Element with lang attribute has valid language tag | 3.1.2 |`valid-lang`| 14 / 14 |
45
45
| ✅ |[307n5z](https://act-rules.github.io/rules/307n5z) — Element with presentational children has no focusable content | 4.1.2 |`nested-interactive`| 0 / 9 |
46
-
| ✅ |[4e8ab6](https://act-rules.github.io/rules/4e8ab6) — Element with role attribute has required states and properties | 1.3.1, 4.1.2 |`aria-required-attr`| 0 / 11|
46
+
| ✅ |[4e8ab6](https://act-rules.github.io/rules/4e8ab6) — Element with role attribute has required states and properties | 1.3.1, 4.1.2 |`aria-required-attr`| 0 / 12|
47
47
| ✅ |[36b590](https://act-rules.github.io/rules/36b590) — Error message describes invalid form field value | 3.3.1 |`error-message`| 8 / 8 |
48
48
| ❌ |[80af7b](https://act-rules.github.io/rules/80af7b) — Focusable element has no keyboard trap | 2.1.2 | — | 0 / 12 |
49
49
| ❌ |[ebe86a](https://act-rules.github.io/rules/ebe86a) — Focusable element has no keyboard trap via non-standard navigation | — | — | 0 / 6 |
@@ -101,7 +101,7 @@ The W3C [ACT implementations report](https://www.w3.org/WAI/standards-guidelines
101
101
| ❌ |[d7ba54](https://act-rules.github.io/rules/d7ba54) — Video element visual-only content has audio track alternative | — | — | 0 / 3 |
102
102
| ❌ |[ee13b5](https://act-rules.github.io/rules/ee13b5) — Video element visual-only content has transcript | 1.2.1, 1.3.1 | — | 0 / 6 |
103
103
| ❌ |[fd26cf](https://act-rules.github.io/rules/fd26cf) — Video element visual-only content is media alternative for text | — | — | 0 / 5 |
104
-
| ✅ |[2ee8b8](https://act-rules.github.io/rules/2ee8b8) — Visible label is part of accessible name | 2.5.3 |`label-content-name-mismatch`|10 / 11|
104
+
| ✅ |[2ee8b8](https://act-rules.github.io/rules/2ee8b8) — Visible label is part of accessible name | 2.5.3 |`label-content-name-mismatch`|31 / 32|
105
105
| ❌ |[59br37](https://act-rules.github.io/rules/59br37) — Zoomed text node is not clipped with CSS overflow | 1.4.4 | — | 0 / 9 |
0 commit comments