Changeset 155078 in webkit


Ignore:
Timestamp:
Sep 4, 2013 3:55:52 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

AX: when no other label on provided on form elements, WebKit should fall back to using @title
https://bugs.webkit.org/show_bug.cgi?id=112842

Patch by Samuel White <Samuel White> on 2013-09-04
Reviewed by Chris Fleizach.

Source/WebCore:

Don't let input elements include empty labels in their accessibility title.

Test: platform/mac/accessibility/input-title.html

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::titleElementText):

LayoutTests:

Added test to ensure that input elements are computing their
accessibility title as expected.

  • platform/mac/accessibility/input-title-expected.txt: Added.
  • platform/mac/accessibility/input-title.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r155069 r155078  
     12013-09-04  Samuel White  <samuel_white@apple.com>
     2
     3        AX: when no other label on provided on form elements, WebKit should fall back to using @title
     4        https://bugs.webkit.org/show_bug.cgi?id=112842
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Added test to ensure that input elements are computing their
     9        accessibility title as expected.
     10
     11        * platform/mac/accessibility/input-title-expected.txt: Added.
     12        * platform/mac/accessibility/input-title.html: Added.
     13
    1142013-09-04  Tim Horton  <timothy_horton@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r155077 r155078  
     12013-09-04  Samuel White  <samuel_white@apple.com>
     2
     3        AX: when no other label on provided on form elements, WebKit should fall back to using @title
     4        https://bugs.webkit.org/show_bug.cgi?id=112842
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Don't let input elements include empty labels in their accessibility title.
     9
     10        Test: platform/mac/accessibility/input-title.html
     11
     12        * accessibility/AccessibilityNodeObject.cpp:
     13        (WebCore::AccessibilityNodeObject::titleElementText):
     14
    1152013-09-04  Andreas Kling  <akling@apple.com>
    216
  • trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp

    r154940 r155078  
    11721172        if (label) {
    11731173            AccessibilityObject* labelObject = axObjectCache()->getOrCreate(label);
    1174             textOrder.append(AccessibilityText(label->innerText(), LabelByElementText, labelObject));
     1174            String innerText = label->innerText();
     1175            if (!innerText.isEmpty())
     1176                textOrder.append(AccessibilityText(innerText, LabelByElementText, labelObject));
    11751177            return;
    11761178        }
Note: See TracChangeset for help on using the changeset viewer.