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

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

Issue 1825733002: Revert of Exposed the children of elements with role textbox in order to make rich text information available… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | content/browser/accessibility/browser_accessibility_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/accessibility/browser_accessibility.cc
diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc
index e3bef4e78b2851bb482ca6494fc5126cffdb624a..4afad6bfe73d80ba0d0fd2bf9a450dd19c6eb8d9 100644
--- a/content/browser/accessibility/browser_accessibility.cc
+++ b/content/browser/accessibility/browser_accessibility.cc
@@ -451,10 +451,7 @@
base::string16 BrowserAccessibility::GetValue() const {
base::string16 value = GetString16Attribute(ui::AX_ATTR_VALUE);
- // Some screen readers like Jaws and older versions of VoiceOver require a
- // value to be set in text fields with rich content, even though the same
- // information is available on the children.
- if (value.empty() && (IsSimpleTextControl() || IsRichTextControl()))
+ if (value.empty() && IsSimpleTextControl())
value = GetInnerText();
return value;
}
@@ -832,7 +829,9 @@
}
bool BrowserAccessibility::HasCaret() const {
- if (IsSimpleTextControl() && HasIntAttribute(ui::AX_ATTR_TEXT_SEL_START) &&
+ if (HasState(ui::AX_STATE_EDITABLE) &&
+ !HasState(ui::AX_STATE_RICHLY_EDITABLE) &&
+ HasIntAttribute(ui::AX_ATTR_TEXT_SEL_START) &&
HasIntAttribute(ui::AX_ATTR_TEXT_SEL_END)) {
return true;
}
@@ -940,9 +939,8 @@
switch (GetRole()) {
case ui::AX_ROLE_COMBO_BOX:
case ui::AX_ROLE_SEARCH_BOX:
+ case ui::AX_ROLE_TEXT_FIELD:
return true;
- case ui::AX_ROLE_TEXT_FIELD:
- return !HasState(ui::AX_STATE_RICHLY_EDITABLE);
default:
return false;
}
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698