⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 176481 in webkit


Ignore:
Timestamp:
Nov 21, 2014, 4:02:59 PM (12 years ago)
Author:
Chris Fleizach
Message:

AX: Unclear that user and password are autofilled, no VoiceOver version of the yellow outline.
https://bugs.webkit.org/show_bug.cgi?id=138904

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Add an attribute that marks when a text field is auto-filled.

Test: accessibility/auto-filled-value.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::isValueAutofilled):

  • accessibility/AccessibilityObject.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

LayoutTests:

  • accessibility/auto-filled-value.html: Added.
  • platform/mac/accessibility/auto-filled-value-expected.txt: Added.
Location:
trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r176479 r176481  
     12014-11-21  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: Unclear that user and password are autofilled, no VoiceOver version of the yellow outline.
     4        https://bugs.webkit.org/show_bug.cgi?id=138904
     5
     6        Reviewed by Mario Sanchez Prada.
     7
     8        * accessibility/auto-filled-value.html: Added.
     9        * platform/mac/accessibility/auto-filled-value-expected.txt: Added.
     10
    1112014-11-21  Michael Saboff  <msaboff@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r176478 r176481  
     12014-11-21  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: Unclear that user and password are autofilled, no VoiceOver version of the yellow outline.
     4        https://bugs.webkit.org/show_bug.cgi?id=138904
     5
     6        Reviewed by Mario Sanchez Prada.
     7
     8        Add an attribute that marks when a text field is auto-filled.
     9
     10        Test: accessibility/auto-filled-value.html
     11
     12        * accessibility/AccessibilityObject.cpp:
     13        (WebCore::AccessibilityObject::isValueAutofilled):
     14        * accessibility/AccessibilityObject.h:
     15        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
     16        (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
     17        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
     18
    1192014-11-21  Andreas Kling  <akling@apple.com>
    220
  • trunk/Source/WebCore/accessibility/AccessibilityObject.cpp

    r176162 r176481  
    4141#include "FrameLoader.h"
    4242#include "FrameSelection.h"
     43#include "HTMLInputElement.h"
    4344#include "HTMLNames.h"
    4445#include "HTMLParserIdioms.h"
     
    19721973    return nullptr;
    19731974}
     1975   
     1976bool AccessibilityObject::isValueAutofilled() const
     1977{
     1978    if (!isNativeTextControl())
     1979        return false;
     1980   
     1981    Node* node = this->node();
     1982    if (!node || !is<HTMLInputElement>(*node))
     1983        return false;
     1984   
     1985    return downcast<HTMLInputElement>(*node).isAutofilled();
     1986}
    19741987
    19751988const AtomicString& AccessibilityObject::placeholderValue() const
  • trunk/Source/WebCore/accessibility/AccessibilityObject.h

    r176331 r176481  
    833833
    834834    virtual String passwordFieldValue() const { return String(); }
    835 
     835    bool isValueAutofilled() const;
     836   
    836837    // Used by an ARIA tree to get all its rows.
    837838    void ariaTreeRows(AccessibilityChildrenVector&);
  • trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm

    r176318 r176481  
    751751}
    752752
     753- (BOOL)_accessibilityValueIsAutofilled
     754{
     755    if (![self _prepareAccessibilityCall])
     756        return NO;
     757
     758    return m_object->isValueAutofilled();
     759}
     760
    753761- (CGFloat)_accessibilityMinValue
    754762{
  • trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

    r176162 r176481  
    128128#ifndef NSAccessibilityAccessKeyAttribute
    129129#define NSAccessibilityAccessKeyAttribute @"AXAccessKey"
     130#endif
     131
     132#ifndef NSAccessibilityValueAutofilledAttribute
     133#define NSAccessibilityValueAutofilledAttribute @"AXValueAutofilled"
    130134#endif
    131135
     
    13741378        [tempArray addObject:NSAccessibilityInvalidAttribute];
    13751379        [tempArray addObject:NSAccessibilityPlaceholderValueAttribute];
     1380        [tempArray addObject:NSAccessibilityValueAutofilledAttribute];
    13761381        textAttrs = [[NSArray alloc] initWithArray:tempArray];
    13771382        [tempArray release];
     
    15411546        [tempArray addObject:NSAccessibilityInvalidAttribute];
    15421547        [tempArray addObject:NSAccessibilityPlaceholderValueAttribute];
     1548        [tempArray addObject:NSAccessibilityValueAutofilledAttribute];
    15431549        passwordFieldAttrs = [[NSArray alloc] initWithArray:tempArray];
    15441550        [tempArray release];
     
    28612867    if ([attributeName isEqualToString:NSAccessibilityPlaceholderValueAttribute])
    28622868        return m_object->placeholderValue();
    2863    
     2869
     2870    if ([attributeName isEqualToString:NSAccessibilityValueAutofilledAttribute])
     2871        return @(m_object->isValueAutofilled());
     2872
    28642873    if ([attributeName isEqualToString:NSAccessibilityHasPopupAttribute])
    28652874        return [NSNumber numberWithBool:m_object->ariaHasPopup()];
Note: See TracChangeset for help on using the changeset viewer.