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

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

Issue 890273002: Return table headers for aria tables. (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
« no previous file with comments | « Source/modules/accessibility/AXARIAGridRow.cpp ('k') | Source/modules/accessibility/AXTableRow.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXTableColumn.cpp
diff --git a/Source/modules/accessibility/AXTableColumn.cpp b/Source/modules/accessibility/AXTableColumn.cpp
index aec01b26afaf5f8c9d650eb3077c88066c88ef92..3e23310bb28a1dd7b4eb2b79b1776415d975b3d5 100644
--- a/Source/modules/accessibility/AXTableColumn.cpp
+++ b/Source/modules/accessibility/AXTableColumn.cpp
@@ -72,7 +72,24 @@ void AXTableColumn::headerObjectsForColumn(AccessibilityChildrenVector& headers)
return;
RenderObject* renderer = m_parent->renderer();
- if (!renderer || !renderer->isTable())
+ if (!renderer)
+ return;
+
+ if (!m_parent->isAXTable())
+ return;
+
+ if (toAXTable(m_parent)->isAriaTable()) {
+ AccessibilityChildrenVector columnChildren = children();
+ unsigned childrenCount = columnChildren.size();
+ for (unsigned i = 0; i < childrenCount; i++) {
+ AXObject* cell = columnChildren[i].get();
+ if (cell->roleValue() == ColumnHeaderRole)
+ headers.append(cell);
+ }
+ return;
+ }
+
+ if (!renderer->isTable())
return;
LayoutTable* table = toLayoutTable(renderer);
« no previous file with comments | « Source/modules/accessibility/AXARIAGridRow.cpp ('k') | Source/modules/accessibility/AXTableRow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698