Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(865)

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXObject.cpp

Issue 2805343002: Compute accessible name of objects with ARIA role of 'row' if they can receive focus (Closed)
Patch Set: Add negative test Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/accessibility/aria-row-name.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/accessibility/AXObject.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
index 0abca8131839e2b88f0b3b8a1a038708aa7165ce..85af866179c74fe5713e90052d783c1fd23556e9 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
@@ -1769,6 +1769,16 @@ bool AXObject::NameFromContents() const {
case kTreeItemRole:
case kUserInterfaceTooltipRole:
return true;
+ case kRowRole: {
+ // Spec says we should always expose the name on rows,
+ // but for performance reasons we only do it
+ // if the row might receive focus
+ if (AncestorExposesActiveDescendant()) {
+ return true;
+ }
+ const Node* node = this->GetNode();
+ return node && node->IsElementNode() && ToElement(node)->IsFocusable();
+ }
default:
return false;
}
« no previous file with comments | « third_party/WebKit/LayoutTests/accessibility/aria-row-name.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698