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

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

Issue 846013002: Use rowgroup and columgroup properties to expose table headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated expectation result file 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
« no previous file with comments | « Source/modules/accessibility/AXTableCell.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXTableCell.cpp
diff --git a/Source/modules/accessibility/AXTableCell.cpp b/Source/modules/accessibility/AXTableCell.cpp
index 306215b4391ecc746a0e4d5c204d56c878902912..f5a678d957dbc1eec2d777e1ba441ddf8efa5c69 100644
--- a/Source/modules/accessibility/AXTableCell.cpp
+++ b/Source/modules/accessibility/AXTableCell.cpp
@@ -56,6 +56,18 @@ bool AXTableCell::isTableHeaderCell() const
return node() && node()->hasTagName(thTag);
}
+bool AXTableCell::isRowHeaderCell() const
+{
+ const AtomicString& scope = getAttribute(scopeAttr);
+ return equalIgnoringCase(scope, "row") || equalIgnoringCase(scope, "rowgroup");
+}
+
+bool AXTableCell::isColumnHeaderCell() const
+{
+ const AtomicString& scope = getAttribute(scopeAttr);
+ return equalIgnoringCase(scope, "col") || equalIgnoringCase(scope, "colgroup");
+}
+
bool AXTableCell::computeAccessibilityIsIgnored() const
{
AXObjectInclusion decision = defaultObjectInclusion();
@@ -113,10 +125,10 @@ AccessibilityRole AXTableCell::scanToDecideHeaderRole()
return CellRole;
// Check scope attribute first.
- const AtomicString& scope = getAttribute(scopeAttr);
- if (equalIgnoringCase(scope, "row"))
+ if (isRowHeaderCell())
return RowHeaderRole;
- if (equalIgnoringCase(scope, "col"))
+
+ if (isColumnHeaderCell())
return ColumnHeaderRole;
// Check the previous cell and the next cell
« no previous file with comments | « Source/modules/accessibility/AXTableCell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698