1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

LibWebView+WebContent: Expose the Accessibility Tree to Other Processes

This patch also stubs out notify_server_did_get_accessiblity_tree in
ladybird since ViewImplementation now has it. However, this feature
is still immature, so just stubbing out in ladybird for now. Once we
have more robust support in Serenity (namely ARIA properties/state
and accessible names and descriptions) we can port this
functionality over.
This commit is contained in:
Jonah 2022-12-07 19:30:37 -06:00 committed by Sam Atkins
parent a469bbd178
commit 367b1634fd
11 changed files with 37 additions and 0 deletions

View file

@ -50,6 +50,7 @@ public:
DeprecatedString node_box_sizing_json;
};
Optional<DOMNodeProperties> inspect_dom_node(i32 node_id, Optional<Web::CSS::Selector::PseudoElement>);
void inspect_accessibility_tree();
void clear_inspected_dom_node();
i32 get_hovered_node_id();
@ -97,6 +98,7 @@ public:
Function<void(const AK::URL&, DeprecatedString const&)> on_get_source;
Function<void(DeprecatedString const&)> on_get_dom_tree;
Function<void(i32 node_id, DeprecatedString const& computed_style, DeprecatedString const& resolved_style, DeprecatedString const& custom_properties, DeprecatedString const& node_box_sizing)> on_get_dom_node_properties;
Function<void(DeprecatedString const&)> on_get_accessibility_tree;
Function<void(i32 message_id)> on_js_console_new_message;
Function<void(i32 start_index, Vector<DeprecatedString> const& message_types, Vector<DeprecatedString> const& messages)> on_get_js_console_messages;
Function<Vector<Web::Cookie::Cookie>(AK::URL const& url)> on_get_all_cookies;
@ -170,6 +172,7 @@ private:
virtual void notify_server_did_get_source(const AK::URL& url, DeprecatedString const& source) override;
virtual void notify_server_did_get_dom_tree(DeprecatedString const& dom_tree) override;
virtual void notify_server_did_get_dom_node_properties(i32 node_id, DeprecatedString const& computed_style, DeprecatedString const& resolved_style, DeprecatedString const& custom_properties, DeprecatedString const& node_box_sizing) override;
virtual void notify_server_did_get_accessibility_tree(DeprecatedString const& accessibility_tree) override;
virtual void notify_server_did_output_js_console_message(i32 message_index) override;
virtual void notify_server_did_get_js_console_messages(i32 start_index, Vector<DeprecatedString> const& message_types, Vector<DeprecatedString> const& messages) override;
virtual void notify_server_did_change_favicon(Gfx::Bitmap const& favicon) override;