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

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 8123f10421f5af4d7f0213791594e4df3705d6ef..966dccadf6cd54ea22ad20e857d64dc9b60f87ba 100644
--- a/content/browser/accessibility/browser_accessibility_com_win.cc
+++ b/content/browser/accessibility/browser_accessibility_com_win.cc
@@ -5294,11 +5294,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;
@@ -5364,6 +5359,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,
@@ -5371,23 +5371,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