This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Implement ITextProvider and ITextRangeProvider for UIA #38284
Closed
Closed
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
d9c317f
Initial commit
yaakovschectman 3b3dbe0
Fix unittests
yaakovschectman 440101d
Tests not great
yaakovschectman 623d906
Default true kIsLineBreakingObject
yaakovschectman 49c41e7
Add new unittest files, not ready to use
yaakovschectman 790cd07
Partway to ready
yaakovschectman 3746c59
TextProvider OK, others not
yaakovschectman 7b6c3a7
Spain but the A is silent
yaakovschectman 7066588
Tests mostly good
yaakovschectman c2896b4
Flutter licenses
yaakovschectman aa6bff9
Remove debugging condition
yaakovschectman 74d9a2c
Formatting
yaakovschectman d172f5b
Formatting
yaakovschectman b4d8064
Formatting
yaakovschectman 7f19fce
Formatting
yaakovschectman 12e8ab7
Formatting
yaakovschectman d92a89a
BUILD.gn order
yaakovschectman 21b083c
Update licenses
yaakovschectman 6b610fe
Typo
yaakovschectman 80b7358
Licenses
yaakovschectman b28c99f
Linux unopt
yaakovschectman 637629d
Licenses
yaakovschectman 36b4713
Licenses
yaakovschectman eac4292
Licenses
yaakovschectman 63cbbd9
Clarify comment
yaakovschectman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,10 @@ | |
|
||
#include "flutter/third_party/accessibility/ax/ax_event_generator.h" | ||
#include "flutter/third_party/accessibility/ax/ax_tree.h" | ||
#include "flutter/third_party/accessibility/ax/ax_tree_manager.h" | ||
#include "flutter/third_party/accessibility/ax/ax_tree_observer.h" | ||
#include "flutter/third_party/accessibility/ax/platform/ax_platform_node_delegate.h" | ||
#include "flutter/third_party/accessibility/ax/platform/ax_platform_tree_manager.h" | ||
|
||
#include "flutter_platform_node_delegate.h" | ||
|
||
|
@@ -39,6 +41,7 @@ namespace flutter { | |
class AccessibilityBridge | ||
: public std::enable_shared_from_this<AccessibilityBridge>, | ||
public FlutterPlatformNodeDelegate::OwnerBridge, | ||
public ui::AXPlatformTreeManager, | ||
loic-sharma marked this conversation as resolved.
Show resolved
Hide resolved
|
||
private ui::AXTreeObserver { | ||
public: | ||
//----------------------------------------------------------------------------- | ||
|
@@ -106,6 +109,39 @@ class AccessibilityBridge | |
const std::vector<ui::AXEventGenerator::TargetedEvent> GetPendingEvents() | ||
const; | ||
|
||
// |AXTreeManager| | ||
ui::AXNode* GetNodeFromTree(const ui::AXTreeID tree_id, | ||
loic-sharma marked this conversation as resolved.
Show resolved
Hide resolved
|
||
const ui::AXNode::AXID node_id) const override; | ||
|
||
// |AXTreeManager| | ||
ui::AXNode* GetNodeFromTree(const ui::AXNode::AXID node_id) const override; | ||
|
||
// |AXTreeManager| | ||
ui::AXTreeID GetTreeID() const override; | ||
|
||
// |AXTreeManager| | ||
ui::AXTreeID GetParentTreeID() const override; | ||
|
||
// |AXTreeManager| | ||
ui::AXNode* GetRootAsAXNode() const override; | ||
|
||
// |AXTreeManager| | ||
ui::AXNode* GetParentNodeFromParentTreeAsAXNode() const override; | ||
|
||
// |AXTreeManager| | ||
ui::AXTree* GetTree() const override; | ||
|
||
// |AXPlatformTreeManager| | ||
ui::AXPlatformNode* GetPlatformNodeFromTree( | ||
const ui::AXNode::AXID node_id) const override; | ||
|
||
// |AXPlatformTreeManager| | ||
ui::AXPlatformNode* GetPlatformNodeFromTree( | ||
const ui::AXNode& node) const override; | ||
|
||
// |AXPlatformTreeManager| | ||
ui::AXPlatformNodeDelegate* RootDelegate() const override; | ||
|
||
protected: | ||
//--------------------------------------------------------------------------- | ||
/// @brief Handle accessibility events generated due to accessibility | ||
|
@@ -176,7 +212,7 @@ class AccessibilityBridge | |
std::unordered_map<AccessibilityNodeId, | ||
std::shared_ptr<FlutterPlatformNodeDelegate>> | ||
id_wrapper_map_; | ||
ui::AXTree tree_; | ||
std::unique_ptr<ui::AXTree> tree_; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed this to a pointer so we can return a pointer in the implementation for AX Tree Manager. |
||
ui::AXEventGenerator event_generator_; | ||
std::unordered_map<int32_t, SemanticsNode> pending_semantics_node_updates_; | ||
std::unordered_map<int32_t, SemanticsCustomAction> | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to double-check, should this be kept?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I probably will need to set up a new issue for this if there isn't one yet. I don't think we currently have a good way to keep track of this attribute that is used by the AX code, so this is a placeholder as I think commonly used elements usually behave as their own line wrt a11y.