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

Unified Diff: content/browser/accessibility/browser_accessibility_com_win.cc

Issue 2867073003: Name calculation should not include nameFrom:author descendants. (Closed)
Patch Set: Rebase Created 3 years, 7 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
Index: content/browser/accessibility/browser_accessibility_com_win.cc
diff --git a/content/browser/accessibility/browser_accessibility_com_win.cc b/content/browser/accessibility/browser_accessibility_com_win.cc
index 17ff9a29529348f65f1bd3406c917805b88e060d..5e962e54408c4c6d49b041eddeb6aab1a9f39153 100644
--- a/content/browser/accessibility/browser_accessibility_com_win.cc
+++ b/content/browser/accessibility/browser_accessibility_com_win.cc
@@ -5291,11 +5291,6 @@ void BrowserAccessibilityComWin::InitRoleAndState() {
ia_role = ROLE_SYSTEM_DROPLIST;
ia2_role = IA2_ROLE_DATE_EDITOR;
break;
- case ui::AX_ROLE_DIV:
- role_name = L"div";
- ia_role = ROLE_SYSTEM_GROUPING;
- ia2_role = IA2_ROLE_SECTION;
- break;
case ui::AX_ROLE_DEFINITION:
role_name = html_tag;
ia2_role = IA2_ROLE_PARAGRAPH;
@@ -5361,6 +5356,11 @@ void BrowserAccessibilityComWin::InitRoleAndState() {
ia_role = ROLE_SYSTEM_GROUPING;
ia2_role = IA2_ROLE_FOOTER;
break;
+ case ui::AX_ROLE_GENERIC_CONTAINER:
+ ia_role = ROLE_SYSTEM_GROUPING;
+ ia2_role = IA2_ROLE_SECTION;
+ role_name = html_tag.empty() ? L"div" : html_tag;
+ break;
case ui::AX_ROLE_GRID:
ia_role = ROLE_SYSTEM_TABLE;
// TODO(aleventhal) this changed between ARIA 1.0 and 1.1,
@@ -5368,23 +5368,9 @@ void BrowserAccessibilityComWin::InitRoleAndState() {
// or editable by default
// ia_state |= STATE_SYSTEM_READONLY;
break;
- case ui::AX_ROLE_GROUP: {
- base::string16 aria_role =
- owner()->GetString16Attribute(ui::AX_ATTR_ROLE);
- if (aria_role == L"group" || html_tag == L"fieldset") {
- ia_role = ROLE_SYSTEM_GROUPING;
- } else if (html_tag == L"li") {
- ia_role = ROLE_SYSTEM_LISTITEM;
- ia_state |= STATE_SYSTEM_READONLY;
- } else {
- if (html_tag.empty())
- role_name = L"div";
- else
- role_name = html_tag;
- ia2_role = IA2_ROLE_SECTION;
- }
+ case ui::AX_ROLE_GROUP:
+ ia_role = ROLE_SYSTEM_GROUPING;
break;
- }
case ui::AX_ROLE_HEADING:
role_name = html_tag;
if (html_tag.empty())

Powered by Google App Engine
This is Rietveld 408576698