mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb: Move ariaActiveDescendantElement to ARIAMixin
Not an issue right now, but all IDL types that include the ARIA mixin will need this.
This commit is contained in:
parent
a7b1f2c800
commit
0289df9357
Notes:
github-actions[bot]
2025-04-25 00:21:29 +00:00
Author: https://github.com/trflynn89
Commit: 0289df9357
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4460
Reviewed-by: https://github.com/tcl3 ✅
4 changed files with 20 additions and 9 deletions
|
@ -11,6 +11,14 @@
|
|||
|
||||
namespace Web::ARIA {
|
||||
|
||||
ARIAMixin::ARIAMixin() = default;
|
||||
ARIAMixin::~ARIAMixin() = default;
|
||||
|
||||
void ARIAMixin::visit_edges(GC::Cell::Visitor& visitor)
|
||||
{
|
||||
visitor.visit(m_aria_active_descendant_element);
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/wai-aria-1.2/#introroles
|
||||
Optional<Role> ARIAMixin::role_from_role_attribute_value() const
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Web::ARIA {
|
|||
|
||||
class ARIAMixin {
|
||||
public:
|
||||
virtual ~ARIAMixin() = default;
|
||||
virtual ~ARIAMixin();
|
||||
|
||||
#define __ENUMERATE_ARIA_ATTRIBUTE(name, attribute) \
|
||||
virtual Optional<String> name() const = 0; \
|
||||
|
@ -48,10 +48,18 @@ public:
|
|||
// https://www.w3.org/TR/wai-aria-1.2/#valuetype_idref_list
|
||||
Vector<String> parse_id_reference_list(Optional<String> const&) const;
|
||||
|
||||
GC::Ptr<DOM::Element> aria_active_descendant_element() { return m_aria_active_descendant_element; }
|
||||
void set_aria_active_descendant_element(GC::Ptr<DOM::Element> value) { m_aria_active_descendant_element = value; }
|
||||
|
||||
protected:
|
||||
ARIAMixin() = default;
|
||||
ARIAMixin();
|
||||
|
||||
void visit_edges(GC::Cell::Visitor&);
|
||||
|
||||
virtual bool id_reference_exists(String const&) const = 0;
|
||||
|
||||
private:
|
||||
GC::Ptr<DOM::Element> m_aria_active_descendant_element;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue