Commit Graph

24 Commits

Author SHA1 Message Date
Dmitry Gozman c9a1ad4d8d
chore: use a singleton "builtins" instead of passing it around (#35493) 2025-04-10 09:30:39 +01:00
Dmitry Gozman 4c85672f02
fix(role): `<input type=file>` should be a button (#35514) 2025-04-08 09:02:19 +01:00
Dmitry Gozman 0467c28722
chore: builtins (#35197) 2025-03-25 13:49:28 +00:00
Dmitry Gozman b148cbad76
fix: remove unicode soft hyphen in normalizeWhitespace (#34920) 2025-02-25 16:54:02 +00:00
Pavel Feldman 7fd0c3e254
fix: follow the pseudo attr value in firefox computed style (#34525) 2025-01-28 14:37:04 -08:00
Dmitry Gozman 6e19bc341f
fix(role): ignore invalid `aria-labelledby` attributes (#33667) 2024-11-19 03:56:16 -08:00
Pavel Feldman bc87467b25
chore: generate simple dom descriptions in codegen (#32333) 2024-08-27 11:52:14 -07:00
Dmitry Gozman 571f25a7d3
fix(role): hidden pseudos should not contribute to accessible name (#32251) 2024-08-21 11:14:41 -07:00
Dmitry Gozman b4a9b247b4
fix(role): make sure to ignore style/script/noscript/template (#32231)
Even when these are a part of a hidden `aria-labelledby` traversal, all
browsers ignore them anyway.
2024-08-20 09:02:23 -07:00
Dmitry Gozman fd92509dda
fix(role): extract tagName safely (#30636)
Fixes #30616.
2024-05-02 09:42:19 -07:00
Dmitry Gozman 9b6627a063
feat(role): roll and pass WPT accname tests, calculate description (#30434)
There are new "non-manual" WPT accname tests that we now mostly pass,
which required a few tweeks in calculating role and name.

Also implemented accessible description computation, which is just a
small addition on top of accessible name, and passed respective wpt
tests.

References #18332.
2024-04-19 12:49:49 -07:00
Dmitry Gozman 103ec90751
fix(role): align presentation role conflict resolution with the spec (#30408)
See
https://www.w3.org/TR/wai-aria-1.2/#conflict_resolution_presentation_none

Fixes #26809.
2024-04-18 08:53:31 -07:00
Dmitry Gozman 984182bd53
fix(role): embedded control inside the target element (#30403)
According to the spec, such controls should use the native value as long
as they have "aria-label". The relevant spec section is 2D.

However, there is an open issue that claims this should always apply,
and all browsers and wpt test actually do that:
https://github.com/w3c/accname/issues/64.

Fixes #28848.
2024-04-17 12:25:08 -07:00
Dmitry Gozman b72e3a3eba
fix(role): explicitly hidden aria-labelledby should be recursively traversed (#30402)
The accessible name computation spec has changed to explicitly mention
this case:

Step 2A. Hidden Not Referenced. If the current node is hidden and is:
- Not part of an aria-labelledby or aria-describedby traversal, where
the node directly referenced by that relation was hidden.
- Nor part of a native host language text alternative element (e.g.
label in HTML) or attribute traversal, where the root of that traversal
was hidden.

See https://w3c.github.io/accname/#computation-steps. Chromium, Firefox
and Safari all agree with the spec.

Fixes #29796.
2024-04-17 11:22:09 -07:00
Dmitry Gozman 11659ceb73
fix(role): handle display:contents elements (#23607)
Fixes #23521.
2023-06-08 16:00:48 -07:00
Dmitry Gozman ca3629186c
fix(role): fix native controls text alternative when `aria-labelledby` is present (#22800)
Fixes #22779.
2023-05-03 16:09:08 -07:00
Dmitry Gozman 1fbefa694f
fix(role): update accessible name calculation for native buttons (#22124)
There is a new section in the spec:

https://w3c.github.io/html-aam/#button-element-accessible-name-computation

Fixes #21808.
2023-03-31 14:17:18 -07:00
Dmitry Gozman 6a2b4ed142
fix(role): use <title> for elements inside svg (#22043)
Follows svg-aam mapping:
https://www.w3.org/TR/svg-aam-1.0/#mapping_additional_nd

Fixes #21486.
2023-03-28 15:52:16 -07:00
Dmitry Gozman 0087bfac23
fix(role): update allowsNameFromContent to closer align with blink/gecko (#19692) 2022-12-27 09:06:46 -08:00
Dmitry Gozman 652ec2f1fa test: split accname, fix select preventing context closure 2022-06-09 13:58:22 -07:00
Dmitry Gozman 6b48631eed
feat(role): add more tests for accessible name (#13154) 2022-03-29 11:59:44 -07:00
Dmitry Gozman 01a39e5b4c
test(role): add tests for implicit role calculation (#13132) 2022-03-28 15:22:50 -07:00
Pavel Feldman a4a2d41705 fix(tests): fix selenium installation tests 2022-03-26 08:36:25 -07:00
Pavel Feldman 02cac8a066
chore: group tests under tests/ (1) (#13081) 2022-03-25 16:05:50 -07:00