mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +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:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user