Index: content/renderer/accessibility/blink_ax_tree_source.cc |
diff --git a/content/renderer/accessibility/blink_ax_tree_source.cc b/content/renderer/accessibility/blink_ax_tree_source.cc |
index 4451834f74c95ca04293670c3cc8673c8070b134..2531b928c55729acc4eb9a14e203d91cd7a29867 100644 |
--- a/content/renderer/accessibility/blink_ax_tree_source.cc |
+++ b/content/renderer/accessibility/blink_ax_tree_source.cc |
@@ -89,6 +89,8 @@ std::string GetEquivalentAriaRoleString(const ui::AXRole role) { |
return "region"; |
case ui::AX_ROLE_SLIDER: |
return "slider"; |
+ case ui::AX_ROLE_TIME: |
+ return "time"; |
default: |
break; |
} |
@@ -453,8 +455,6 @@ void BlinkAXTreeSource::SerializeNode(blink::WebAXObject src, |
std::string role = GetEquivalentAriaRoleString(dst->role); |
if (!role.empty()) |
dst->AddStringAttribute(ui::AX_ATTR_ROLE, role); |
- else if (dst->role == ui::AX_ROLE_TIME) |
- dst->AddStringAttribute(ui::AX_ATTR_ROLE, "time"); |
} |
// Browser plugin (used in a <webview>). |
@@ -550,6 +550,18 @@ void BlinkAXTreeSource::SerializeNode(blink::WebAXObject src, |
} |
} |
+ if (dst->role == ui::AX_ROLE_TABLE || |
+ dst->role == ui::AX_ROLE_GRID || |
+ dst->role == ui::AX_ROLE_TREE_GRID) { |
+ int aria_colcount = src.ariaColumnCount(); |
+ if (aria_colcount) |
+ dst->AddIntAttribute(ui::AX_ATTR_ARIA_COL_COUNT, aria_colcount); |
+ |
+ int aria_rowcount = src.ariaRowCount(); |
+ if (aria_rowcount) |
+ dst->AddIntAttribute(ui::AX_ATTR_ARIA_ROW_COUNT, aria_rowcount); |
+ } |
+ |
if (dst->role == ui::AX_ROLE_ROW) { |
dst->AddIntAttribute(ui::AX_ATTR_TABLE_ROW_INDEX, src.rowIndex()); |
WebAXObject header = src.rowHeader(); |
@@ -566,13 +578,25 @@ void BlinkAXTreeSource::SerializeNode(blink::WebAXObject src, |
if (dst->role == ui::AX_ROLE_CELL || |
dst->role == ui::AX_ROLE_ROW_HEADER || |
- dst->role == ui::AX_ROLE_COLUMN_HEADER) { |
- dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_COLUMN_INDEX, |
- src.cellColumnIndex()); |
- dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_COLUMN_SPAN, |
- src.cellColumnSpan()); |
- dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_ROW_INDEX, src.cellRowIndex()); |
- dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_ROW_SPAN, src.cellRowSpan()); |
+ dst->role == ui::AX_ROLE_COLUMN_HEADER || |
+ dst->role == ui::AX_ROLE_ROW) { |
+ if (dst->role != ui::AX_ROLE_ROW) { |
+ dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_COLUMN_INDEX, |
+ src.cellColumnIndex()); |
+ dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_COLUMN_SPAN, |
+ src.cellColumnSpan()); |
+ dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_ROW_INDEX, |
+ src.cellRowIndex()); |
+ dst->AddIntAttribute(ui::AX_ATTR_TABLE_CELL_ROW_SPAN,src.cellRowSpan()); |
+ |
+ int aria_colindex = src.ariaColumnIndex(); |
+ if (aria_colindex) |
+ dst->AddIntAttribute(ui::AX_ATTR_ARIA_COL_INDEX, aria_colindex); |
+ } |
+ |
+ int aria_rowindex = src.ariaRowIndex(); |
+ if (aria_rowindex) |
+ dst->AddIntAttribute(ui::AX_ATTR_ARIA_ROW_INDEX, aria_rowindex); |
} |
if ((dst->role == ui::AX_ROLE_ROW_HEADER || |