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

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

Issue 812243004: TableCaptionElement is not exposed to accessibility (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adding layout test case Created 6 years 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 | « LayoutTests/accessibility/table-caption-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXTable.cpp
diff --git a/Source/modules/accessibility/AXTable.cpp b/Source/modules/accessibility/AXTable.cpp
index 761d4985b37252470ae7cdb6e71bc52d6b3f76c6..1e36baf790c938e7aa7b472427119f2e4bc1492d 100644
--- a/Source/modules/accessibility/AXTable.cpp
+++ b/Source/modules/accessibility/AXTable.cpp
@@ -373,6 +373,15 @@ void AXTable::addChildren()
RenderTable* table = toRenderTable(m_renderer);
AXObjectCacheImpl* axCache = axObjectCache();
+ // Add caption
+ if (HTMLTableElement* tableElement = toHTMLTableElement(table->node())) {
+ if (HTMLTableCaptionElement* caption = tableElement->caption()) {
+ AXObject* captionObject = axCache->getOrCreate(caption);
+ if (!captionObject->accessibilityIsIgnored())
+ m_children.append(captionObject);
+ }
+ }
+
// Go through all the available sections to pull out the rows and add them as children.
table->recalcSectionsIfNeeded();
RenderTableSection* tableSection = table->topSection();
« no previous file with comments | « LayoutTests/accessibility/table-caption-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698