mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 18:08:12 +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
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/DOM/ARIARoles.h>
|
||||
#include <LibWeb/ARIA/Roles.h>
|
||||
#include <LibWeb/HTML/HTMLAreaElement.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
|
@ -50,13 +50,13 @@ i32 HTMLAreaElement::default_tab_index_value() const
|
|||
return 0;
|
||||
}
|
||||
|
||||
Optional<DOM::ARIARoles::Role> HTMLAreaElement::default_role() const
|
||||
Optional<ARIA::Role> HTMLAreaElement::default_role() const
|
||||
{
|
||||
// https://www.w3.org/TR/html-aria/#el-area-no-href
|
||||
if (!href().is_null())
|
||||
return DOM::ARIARoles::Role::link;
|
||||
return ARIA::Role::link;
|
||||
// https://www.w3.org/TR/html-aria/#el-area
|
||||
return DOM::ARIARoles::Role::generic;
|
||||
return ARIA::Role::generic;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue