| Index: content/browser/accessibility/browser_accessibility.cc
|
| diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc
|
| index 4afad6bfe73d80ba0d0fd2bf9a450dd19c6eb8d9..e3bef4e78b2851bb482ca6494fc5126cffdb624a 100644
|
| --- a/content/browser/accessibility/browser_accessibility.cc
|
| +++ b/content/browser/accessibility/browser_accessibility.cc
|
| @@ -451,7 +451,10 @@
|
|
|
| base::string16 BrowserAccessibility::GetValue() const {
|
| base::string16 value = GetString16Attribute(ui::AX_ATTR_VALUE);
|
| - if (value.empty() && IsSimpleTextControl())
|
| + // 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()))
|
| value = GetInnerText();
|
| return value;
|
| }
|
| @@ -829,9 +832,7 @@
|
| }
|
|
|
| bool BrowserAccessibility::HasCaret() const {
|
| - if (HasState(ui::AX_STATE_EDITABLE) &&
|
| - !HasState(ui::AX_STATE_RICHLY_EDITABLE) &&
|
| - HasIntAttribute(ui::AX_ATTR_TEXT_SEL_START) &&
|
| + if (IsSimpleTextControl() && HasIntAttribute(ui::AX_ATTR_TEXT_SEL_START) &&
|
| HasIntAttribute(ui::AX_ATTR_TEXT_SEL_END)) {
|
| return true;
|
| }
|
| @@ -939,8 +940,9 @@
|
| switch (GetRole()) {
|
| case ui::AX_ROLE_COMBO_BOX:
|
| case ui::AX_ROLE_SEARCH_BOX:
|
| + return true;
|
| case ui::AX_ROLE_TEXT_FIELD:
|
| - return true;
|
| + return !HasState(ui::AX_STATE_RICHLY_EDITABLE);
|
| default:
|
| return false;
|
| }
|
|
|