Changeset 190674 in webkit


Ignore:
Timestamp:
Oct 7, 2015, 11:17:56 AM (10 years ago)
Author:
n_wang@apple.com
Message:

AX: ARIA 1.1 @aria-placeholder
https://bugs.webkit.org/show_bug.cgi?id=148970

Reviewed by Chris Fleizach.

Source/WebCore:

Added support for aria-placeholder attribute.

Modified accessibility/placeholder.html test.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::placeholderValue):

  • html/HTMLAttributeNames.in:

LayoutTests:

  • accessibility/placeholder-expected.txt:
  • accessibility/placeholder.html:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r190667 r190674  
     12015-10-07  Nan Wang  <n_wang@apple.com>
     2
     3        AX: ARIA 1.1 @aria-placeholder
     4        https://bugs.webkit.org/show_bug.cgi?id=148970
     5
     6        Reviewed by Chris Fleizach.
     7
     8        * accessibility/placeholder-expected.txt:
     9        * accessibility/placeholder.html:
     10
    1112015-10-06  Simon Fraser  <simon.fraser@apple.com>
    212
  • trunk/LayoutTests/accessibility/placeholder-expected.txt

    r95906 r190674  
    1  
     1   Birthday:
     203-14-1879
    23This test makes sure that the placeholder is returned as the correct attribute
    34
     
    78PASS fieldElement.stringAttributeValue('AXPlaceholderValue') is 'search'
    89PASS pass.stringAttributeValue('AXPlaceholderValue') is 'Password'
     10PASS search.stringAttributeValue('AXPlaceholderValue') is 'MM-DD-YYYY'
    911PASS successfullyParsed is true
    1012
  • trunk/LayoutTests/accessibility/placeholder.html

    r155274 r190674  
    99
    1010    <input id="password" class="field" type="password" name="sc1798" value="" placeholder="Password" spellcheck="true" maxlength="5096">
     11   
     12    <span id="label">Birthday:</span>
     13    <div id="search" role="searchbox" aria-labelledby="label" aria-placeholder="MM-DD-YYYY">03-14-1879</div>
    1114   
    1215    <p id="description"></p>
     
    2427            var pass = accessibilityController.focusedElement;
    2528            shouldBe("pass.stringAttributeValue('AXPlaceholderValue')", "'Password'");
     29           
     30            var search = accessibilityController.accessibleElementById("search");
     31            shouldBe("search.stringAttributeValue('AXPlaceholderValue')", "'MM-DD-YYYY'");
    2632
    2733        }
  • trunk/Source/WebCore/ChangeLog

    r190668 r190674  
     12015-10-07  Nan Wang  <n_wang@apple.com>
     2
     3        AX: ARIA 1.1 @aria-placeholder
     4        https://bugs.webkit.org/show_bug.cgi?id=148970
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Added support for aria-placeholder attribute.
     9
     10        Modified accessibility/placeholder.html test.
     11
     12        * accessibility/AccessibilityObject.cpp:
     13        (WebCore::AccessibilityObject::placeholderValue):
     14        * html/HTMLAttributeNames.in:
     15
    1162015-10-07  Commit Queue  <commit-queue@webkit.org>
    217
  • trunk/Source/WebCore/accessibility/AccessibilityObject.cpp

    r190648 r190674  
    21212121const AtomicString& AccessibilityObject::placeholderValue() const
    21222122{
     2123    const AtomicString& ariaPlaceholder = getAttribute(aria_placeholderAttr);
     2124    if (!ariaPlaceholder.isEmpty())
     2125        return ariaPlaceholder;
     2126   
    21232127    const AtomicString& placeholder = getAttribute(placeholderAttr);
    21242128    if (!placeholder.isEmpty())
  • trunk/Source/WebCore/html/HTMLAttributeNames.in

    r189950 r190674  
    3939aria-orientation
    4040aria-owns
     41aria-placeholder
    4142aria-posinset
    4243aria-pressed
Note: See TracChangeset for help on using the changeset viewer.