Changeset 208159 in webkit
- Timestamp:
- Oct 31, 2016 10:18:19 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r208150 r208159 1 2016-10-31 Nan Wang <n_wang@apple.com> 2 3 AX: iOS Voiceover does not announce previously selected value from input type="date" form field 4 https://bugs.webkit.org/show_bug.cgi?id=164176 5 6 Reviewed by Chris Fleizach. 7 8 * accessibility/ios-simulator/input-type-time-expected.txt: 9 * accessibility/ios-simulator/input-type-time.html: 10 1 11 2016-10-31 Jer Noble <jer.noble@apple.com> 2 12 -
trunk/LayoutTests/accessibility/ios-simulator/input-type-time-expected.txt
r192173 r208159 1 1 2 2 This tests that input type: time is accessible on iOS. 3 3 … … 7 7 PASS timeinput.description is 'AXLabel: (Between: 07:00 AM-09:00 AM)' 8 8 PASS timeinput.isIgnored is false 9 PASS timeinput.stringValue is 'AXValue: 8:00 AM' 10 PASS timeinput2.description is 'AXLabel: ' 11 PASS timeinput2.stringValue is 'AXValue: 8:00 AM' 9 12 PASS successfullyParsed is true 10 13 -
trunk/LayoutTests/accessibility/ios-simulator/input-type-time.html
r192173 r208159 9 9 <body id="body"> 10 10 11 <input id="timeinput" type="time" aria-label="(Between: 07:00 AM-09:00 AM)" min="07:00" max="09:00" step="300" placeholder="00:00 AM"> 11 <input id="timeinput" type="time" aria-label="(Between: 07:00 AM-09:00 AM)" min="07:00" max="09:00" step="300" placeholder="00:00 AM" value="08:00"> 12 <input id="timeinput2" type="time" min="07:00" max="09:00" step="300" value="08:00"> 12 13 13 14 <p id="description"></p> … … 21 22 22 23 var timeinput = accessibilityController.accessibleElementById("timeinput"); 24 var timeinput2 = accessibilityController.accessibleElementById("timeinput2"); 23 25 shouldBe("timeinput.description", "'AXLabel: (Between: 07:00 AM-09:00 AM)'"); 24 26 shouldBeFalse("timeinput.isIgnored"); 27 28 // Test value is exposed in AXValue. 29 shouldBe("timeinput.stringValue", "'AXValue: 8:00 AM'"); 30 shouldBe("timeinput2.description", "'AXLabel: '"); 31 shouldBe("timeinput2.stringValue", "'AXValue: 8:00 AM'"); 25 32 } 26 33 -
trunk/Source/WebCore/ChangeLog
r208158 r208159 1 2016-10-31 Nan Wang <n_wang@apple.com> 2 3 AX: iOS Voiceover does not announce previously selected value from input type="date" form field 4 https://bugs.webkit.org/show_bug.cgi?id=164176 5 6 Reviewed by Chris Fleizach. 7 8 Input type date is a popup button on iOS and its value was not exposed in stringValue() since 9 it's not considered a text control. Instead, the value was exposed in AXTitle. Fixed this by adding 10 the case in stringValue() and removing the AXTitle exposure. 11 12 Changes are covered in modified test. 13 14 * accessibility/AccessibilityObject.h: 15 * accessibility/AccessibilityRenderObject.cpp: 16 (WebCore::AccessibilityRenderObject::stringValue): 17 * accessibility/ios/AccessibilityObjectIOS.mm: 18 (WebCore::AccessibilityObject::isInputTypePopupButton): 19 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: 20 (-[WebAccessibilityObjectWrapper accessibilityLabel]): 21 1 22 2016-10-31 Simon Fraser <simon.fraser@apple.com> 2 23 -
trunk/Source/WebCore/accessibility/AccessibilityObject.h
r208112 r208159 1043 1043 int accessibilityPasswordFieldLength(); 1044 1044 bool hasTouchEventListener() const; 1045 bool isInputTypePopupButton() const; 1045 1046 #endif 1046 1047 -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r208112 r208159 777 777 return text(); 778 778 779 #if PLATFORM(IOS) 780 if (isInputTypePopupButton()) 781 return textUnderElement(); 782 #endif 783 779 784 if (is<RenderFileUploadControl>(*m_renderer)) 780 785 return downcast<RenderFileUploadControl>(*m_renderer).fileTextValue(); -
trunk/Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm
r203955 r208159 91 91 return false; 92 92 } 93 94 bool AccessibilityObject::isInputTypePopupButton() const 95 { 96 if (is<HTMLInputElement>(node())) 97 return roleValue() == PopUpButtonRole; 98 return false; 99 } 93 100 94 101 } // WebCore -
trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
r207583 r208159 998 998 NSString *axDescription = [self baseAccessibilityDescription]; 999 999 NSString *landmarkDescription = [self ariaLandmarkRoleDescription]; 1000 1001 // We should expose the value of the input type date or time through AXValue instead of AXTitle. 1002 if (m_object->isInputTypePopupButton() && [axTitle isEqualToString:[self accessibilityValue]]) 1003 axTitle = nil; 1000 1004 1001 1005 // Footer is not considered a landmark, but we want the role description.
Note: See TracChangeset
for help on using the changeset viewer.