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 |