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

Unified Diff: Source/modules/accessibility/AXARIAGridCell.cpp

Issue 869253002: Aria table row and column headers are not exposed in accessibility (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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
Index: Source/modules/accessibility/AXARIAGridCell.cpp
diff --git a/Source/modules/accessibility/AXARIAGridCell.cpp b/Source/modules/accessibility/AXARIAGridCell.cpp
index b17b3c4069f1f47b61178b955a7874b8f00566d6..680fb94916c73814583b48717bbe53a0f704efb5 100644
--- a/Source/modules/accessibility/AXARIAGridCell.cpp
+++ b/Source/modules/accessibility/AXARIAGridCell.cpp
@@ -50,6 +50,18 @@ PassRefPtr<AXARIAGridCell> AXARIAGridCell::create(RenderObject* renderer, AXObje
return adoptRef(new AXARIAGridCell(renderer, axObjectCache));
}
+bool AXARIAGridCell::isAriaColumnHeader() const
+{
+ const AtomicString& role = getAttribute(HTMLNames::roleAttr);
+ return equalIgnoringCase(role, "columnheader");
+}
+
+bool AXARIAGridCell::isAriaRowHeader() const
+{
+ const AtomicString& role = getAttribute(HTMLNames::roleAttr);
+ return equalIgnoringCase(role, "rowheader");
+}
+
AXObject* AXARIAGridCell::parentTable() const
{
AXObject* parent = parentObjectUnignored();
@@ -121,4 +133,15 @@ void AXARIAGridCell::columnIndexRange(pair<unsigned, unsigned>& columnRange)
columnRange.second = 1;
}
+AccessibilityRole AXARIAGridCell::scanToDecideHeaderRole()
+{
+ if (isAriaRowHeader())
+ return RowHeaderRole;
+
+ if (isAriaColumnHeader())
+ return ColumnHeaderRole;
+
+ return CellRole;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698