mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 12:20:00 +01:00
This is enough for Firefox to display the Accessibility tab, containing our accessibility tree which can be inspected. Most information is blank for now. There's quite a bit of duplication between AccessibilityWalkerActor and WalkerActor - it might be worth trying to make a base class once the details are figured out. Frustratingly, the two don't work quite the same: for a lot of messages that would be sent to WalkerActor, the accessibility equivalent is sent to the AccessibilityNodeActor instead. Co-authored-by: Tim Flynn <trflynn89@pm.me>
36 lines
1.0 KiB
C++
36 lines
1.0 KiB
C++
/*
|
|
* Copyright (c) 2025, Sam Atkins <sam@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibDevTools/Actor.h>
|
|
#include <LibDevTools/Actors/NodeActor.h>
|
|
#include <LibDevTools/Forward.h>
|
|
#include <LibWeb/Forward.h>
|
|
|
|
namespace DevTools {
|
|
|
|
class DEVTOOLS_API AccessibilityNodeActor final : public Actor {
|
|
public:
|
|
static constexpr auto base_name = "accessibility-node"sv;
|
|
|
|
static NonnullRefPtr<AccessibilityNodeActor> create(DevToolsServer&, String name, NodeIdentifier, WeakPtr<AccessibilityWalkerActor>);
|
|
virtual ~AccessibilityNodeActor() override;
|
|
|
|
NodeIdentifier const& node_identifier() const { return m_node_identifier; }
|
|
WeakPtr<AccessibilityWalkerActor> const& walker() const { return m_walker; }
|
|
|
|
private:
|
|
AccessibilityNodeActor(DevToolsServer&, String name, NodeIdentifier, WeakPtr<AccessibilityWalkerActor>);
|
|
|
|
virtual void handle_message(Message const&) override;
|
|
|
|
NodeIdentifier m_node_identifier;
|
|
WeakPtr<AccessibilityWalkerActor> m_walker;
|
|
};
|
|
|
|
}
|