mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-04 18:23:39 +00:00
LibWeb: Assign “dir”, “dd”, “dt” default ARIA roles per-spec
Also, import http://wpt.live/html-aam/dir-role.tentative.html (which provides test/regression coverage for the “dir” change).
This commit is contained in:
parent
ccbc436e85
commit
50e7e9f58d
Notes:
github-actions[bot]
2024-12-12 13:14:45 +00:00
Author: https://github.com/sideshowbarker
Commit: 50e7e9f58d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2836
Reviewed-by: https://github.com/trflynn89
3 changed files with 43 additions and 0 deletions
|
@ -740,6 +740,15 @@ Optional<ARIA::Role> HTMLElement::default_role() const
|
|||
// https://www.w3.org/TR/html-aria/#el-code
|
||||
if (local_name() == TagNames::code)
|
||||
return ARIA::Role::code;
|
||||
// https://w3c.github.io/html-aam/#el-dd
|
||||
if (local_name() == TagNames::dd)
|
||||
return ARIA::Role::definition;
|
||||
// https://wpt.fyi/results/html-aam/dir-role.tentative.html
|
||||
if (local_name() == TagNames::dir)
|
||||
return ARIA::Role::list;
|
||||
// https://w3c.github.io/html-aam/#el-dt
|
||||
if (local_name() == TagNames::dt)
|
||||
return ARIA::Role::term;
|
||||
// https://www.w3.org/TR/html-aria/#el-dfn
|
||||
if (local_name() == TagNames::dfn)
|
||||
return ARIA::Role::term;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue