mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 18:55:07 +00:00
LibWeb: Add Support for the ARIA Element Properties
Element now supports getting and setting ARIA properties from JS and HTML.
This commit is contained in:
parent
0a244b9c1f
commit
e63d9d4925
57 changed files with 976 additions and 1 deletions
|
@ -4,7 +4,9 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/Assertions.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/DOM/ARIARoleNames.h>
|
||||
#include <LibWeb/HTML/HTMLQuoteElement.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
@ -17,4 +19,15 @@ HTMLQuoteElement::HTMLQuoteElement(DOM::Document& document, DOM::QualifiedName q
|
|||
|
||||
HTMLQuoteElement::~HTMLQuoteElement() = default;
|
||||
|
||||
FlyString HTMLQuoteElement::default_role() const
|
||||
{
|
||||
// https://www.w3.org/TR/html-aria/#el-blockquote
|
||||
if (local_name() == TagNames::blockquote)
|
||||
return DOM::ARIARoleNames::blockquote;
|
||||
// https://www.w3.org/TR/html-aria/#el-q
|
||||
if (local_name() == TagNames::q)
|
||||
return DOM::ARIARoleNames::generic;
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue