Commit b2aca3fc authored by Nektarios Paisios's avatar Nektarios Paisios Committed by Commit Bot

Exposes the accessibility ID for each View

Every accessibility object has an ID that is used to identify the object
in accessibility events, calls to methods that navigate the accessibility tree,
such as IAccessible::get_accChild and get_accParent, etc.
Before this patch, we were erroniously exposing an ID of -1 in the accessibility data
of every View instead of its correct ID.
R=aleventhal@chromium.org

Change-Id: I77f31c2a3c0138ff505ff386999c60bf7465fac1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1907428Reviewed-by: default avatarAaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Nektarios Paisios <nektar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714008}
parent c6e8e367
...@@ -119,6 +119,8 @@ const ui::AXUniqueId& ViewAccessibility::GetUniqueId() const { ...@@ -119,6 +119,8 @@ const ui::AXUniqueId& ViewAccessibility::GetUniqueId() const {
} }
void ViewAccessibility::GetAccessibleNodeData(ui::AXNodeData* data) const { void ViewAccessibility::GetAccessibleNodeData(ui::AXNodeData* data) const {
data->id = GetUniqueId().Get();
// Views may misbehave if their widget is closed; return an unknown role // Views may misbehave if their widget is closed; return an unknown role
// rather than possibly crashing. // rather than possibly crashing.
const views::Widget* widget = view_->GetWidget(); const views::Widget* widget = view_->GetWidget();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment