summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.h
diff options
context:
space:
mode:
authorMacDue <macdue@dueutil.tech>2023-01-29 19:12:00 +0100
committerLinus Groh <mail@linusgroh.de>2023-01-28 22:09:18 +0000
commit890b4d79800f61450e903f1b6408431243a94793 (patch)
tree3c882b71a7eeb89655272340fefcdcec6c9deaf5 /Userland/Libraries/LibWeb/HTML/HTMLBodyElement.h
parentf23eba1ba806421703e05d3ce6ea456e7788e3ae (diff)
downloadserenity-890b4d79800f61450e903f1b6408431243a94793.zip
LibWeb: Replace ARIA role static FlyStrings with an enum
This replaces the FlyStrings for ARIA roles that were constructed in a [[gnu::constructor]] with a single enum. I came across this as the DOM inspector was crashing due to a null FlyString for an ARIA role. After fixing that, I was confused as to why these roles were not an enum. Looking at the spec there's a fixed list of roles and switching from references to static strings to an enum was pretty much an exercise in find and replace :). No functional changes (outside of fixing the mentioned crash).
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/HTMLBodyElement.h')
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLBodyElement.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.h b/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.h
index fe5679114b..4b437268fb 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.h
+++ b/Userland/Libraries/LibWeb/HTML/HTMLBodyElement.h
@@ -6,7 +6,7 @@
#pragma once
-#include <LibWeb/DOM/ARIARoleNames.h>
+#include <LibWeb/DOM/ARIARoles.h>
#include <LibWeb/HTML/HTMLElement.h>
#include <LibWeb/HTML/WindowEventHandlers.h>
@@ -24,7 +24,7 @@ public:
virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
// https://www.w3.org/TR/html-aria/#el-body
- virtual DeprecatedFlyString default_role() const override { return DOM::ARIARoleNames::generic; };
+ virtual Optional<DOM::ARIARoles::Role> default_role() const override { return DOM::ARIARoles::Role::generic; };
private:
HTMLBodyElement(DOM::Document&, DOM::QualifiedName);