Changeset 195457 in webkit


Ignore:
Timestamp:
Jan 22, 2016 10:11:51 AM (8 years ago)
Author:
Chris Fleizach
Message:

AX: ARIA combo boxes are not returning the right value for selected text range
https://bugs.webkit.org/show_bug.cgi?id=153260

Reviewed by Darin Adler.

Source/WebCore:

Just because an element has an ARIA role doesn't mean we should always use the selected text range of the whole document.
If the element is also a text based ARIA control, we can still use the element's inner text range to return the right value.

Test: accessibility/selected-text-range-aria-elements.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::selectedTextRange):

LayoutTests:

  • accessibility/selected-text-range-aria-elements-expected.txt: Added.
  • accessibility/selected-text-range-aria-elements.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r195453 r195457  
     12016-01-22  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: ARIA combo boxes are not returning the right value for selected text range
     4        https://bugs.webkit.org/show_bug.cgi?id=153260
     5
     6        Reviewed by Darin Adler.
     7
     8        * accessibility/selected-text-range-aria-elements-expected.txt: Added.
     9        * accessibility/selected-text-range-aria-elements.html: Added.
     10
    1112016-01-21  Dave Hyatt  <hyatt@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r195455 r195457  
     12016-01-22  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: ARIA combo boxes are not returning the right value for selected text range
     4        https://bugs.webkit.org/show_bug.cgi?id=153260
     5
     6        Reviewed by Darin Adler.
     7
     8        Just because an element has an ARIA role doesn't mean we should always use the selected text range of the whole document.
     9        If the element is also a text based ARIA control, we can still use the element's inner text range to return the right value.
     10
     11        Test: accessibility/selected-text-range-aria-elements.html
     12
     13        * accessibility/AccessibilityRenderObject.cpp:
     14        (WebCore::AccessibilityRenderObject::selectedTextRange):
     15
    1162016-01-22  Chris Dumez  <cdumez@apple.com>
    217
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r195452 r195457  
    14941494   
    14951495    AccessibilityRole ariaRole = ariaRoleAttribute();
    1496     if (isNativeTextControl() && ariaRole == UnknownRole) {
     1496    // Use the text control native range if it's a native object and it has no ARIA role (or has a text based ARIA role).
     1497    if (isNativeTextControl() && (ariaRole == UnknownRole || isARIATextControl())) {
    14971498        HTMLTextFormControlElement& textControl = downcast<RenderTextControl>(*m_renderer).textFormControlElement();
    14981499        return PlainTextRange(textControl.selectionStart(), textControl.selectionEnd() - textControl.selectionStart());
Note: See TracChangeset for help on using the changeset viewer.