mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
LibWeb: Move ARIA-related code into the Web::ARIA namespace
ARIA has its own spec and is not part of the DOM spec, which is what the Web::DOM namespace is for (https://www.w3.org/TR/wai-aria-1.2/). This allows us to stay closer to the spec with function names and don't have to add the word "ARIA" to identifiers constantly - the namespace now provides that clarity.
This commit is contained in:
parent
8414734a2d
commit
8556d47240
61 changed files with 179 additions and 180 deletions
|
@ -35,10 +35,10 @@ void AccessibilityTreeNode::serialize_tree_as_json(JsonObjectSerializer<StringBu
|
|||
MUST(object.add("type"sv, "element"sv));
|
||||
|
||||
auto role = element->role_or_default();
|
||||
bool has_role = role.has_value() && !ARIARoles::is_abstract_aria_role(*role);
|
||||
bool has_role = role.has_value() && !ARIA::is_abstract_role(*role);
|
||||
|
||||
if (has_role)
|
||||
MUST(object.add("role"sv, ARIARoles::role_name(*role)));
|
||||
MUST(object.add("role"sv, ARIA::role_name(*role)));
|
||||
else
|
||||
MUST(object.add("role"sv, ""sv));
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue