Changeset 202063 in webkit
- Timestamp:
- Jun 14, 2016 2:28:37 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 10 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202061 r202063 1 2016-06-14 Doug Russell <d_russell@apple.com> 2 3 AX: Form label text should be exposed as static text if it contains only static text 4 https://bugs.webkit.org/show_bug.cgi?id=158634 5 6 Reviewed by Chris Fleizach. 7 8 Use AccessibilityLabel to represent HTMLLabelElement to assistive technology. 9 AccessibilityLabel::containsOnlyStaticText() searches label subtree to evaluate 10 if all children are static text. 11 AccessibilityLabel::stringValue() consults containsOnlyStaticText() and returns 12 textUnderElement() if true. 13 WebAccessibilityObjectWrapperMac consults containsOnlyStaticText() and substitutes 14 StaticTextRole for LabelRole if true. 15 Cache containsOnlyStaticText() in the common case when updating children. 16 17 * accessibility/aria-labelledby-overrides-label-expected.txt: 18 * accessibility/mac/label-element-all-text-string-value-expected.txt: Added. 19 * accessibility/mac/label-element-all-text-string-value.html: Added. 20 * accessibility/mac/label-element-with-hidden-control-expected.txt: 21 * accessibility/mac/label-element-with-hidden-control.html: 22 * accessibility/mac/label-element-with-link-string-value-expected.txt: Added. 23 * accessibility/mac/label-element-with-link-string-value.html: Added. 24 * accessibility/mac/slider-allows-title-ui-element-expected.txt: 25 * accessibility/mac/slider-allows-title-ui-element.html: 26 1 27 2016-06-14 Ryan Haddad <ryanhaddad@apple.com> 2 28 -
trunk/LayoutTests/accessibility/aria-labelledby-overrides-label-expected.txt
r201216 r202063 6 6 PASS platformValueForW3CName(text) is "Shut down computer after 10 minutes" 7 7 PASS text.titleUIElement() != null && text.titleUIElement().isValid is false 8 Label element role is: AXRole: AX Group8 Label element role is: AXRole: AXStaticText 9 9 PASS successfullyParsed is true 10 10 -
trunk/LayoutTests/accessibility/mac/label-element-with-hidden-control-expected.txt
r187799 r202063 5 5 6 6 7 PASS container.childAtIndex('0').role is 'AXRole: AX Group'7 PASS container.childAtIndex('0').role is 'AXRole: AXStaticText' 8 8 PASS container.childAtIndex('0').childAtIndex(0).role is 'AXRole: AXStaticText' 9 9 PASS container.childAtIndex('0').childAtIndex(0).stringValue is 'AXValue: Test label1' -
trunk/LayoutTests/accessibility/mac/label-element-with-hidden-control.html
r187799 r202063 22 22 body.focus(); 23 23 var container = accessibilityController.focusedElement.childAtIndex(0); 24 shouldBe("container.childAtIndex('0').role", "'AXRole: AX Group'");24 shouldBe("container.childAtIndex('0').role", "'AXRole: AXStaticText'"); 25 25 shouldBe("container.childAtIndex('0').childAtIndex(0).role", "'AXRole: AXStaticText'"); 26 26 shouldBe("container.childAtIndex('0').childAtIndex(0).stringValue", "'AXValue: Test label1'"); -
trunk/LayoutTests/accessibility/mac/slider-allows-title-ui-element-expected.txt
r187799 r202063 6 6 7 7 PASS slider.titleUIElement().isEqual(title) is true 8 PASS title.role is 'AXRole: AX Group'8 PASS title.role is 'AXRole: AXStaticText' 9 9 PASS title.childAtIndex(0).role is 'AXRole: AXStaticText' 10 10 PASS successfullyParsed is true -
trunk/LayoutTests/accessibility/mac/slider-allows-title-ui-element.html
r187799 r202063 25 25 26 26 shouldBeTrue("slider.titleUIElement().isEqual(title)"); 27 shouldBe("title.role", "'AXRole: AX Group'");27 shouldBe("title.role", "'AXRole: AXStaticText'"); 28 28 shouldBe("title.childAtIndex(0).role", "'AXRole: AXStaticText'"); 29 29 } -
trunk/Source/WebCore/CMakeLists.txt
r202023 r202063 1051 1051 accessibility/AccessibilityAttachment.cpp 1052 1052 accessibility/AccessibilityImageMapLink.cpp 1053 accessibility/AccessibilityLabel.cpp 1053 1054 accessibility/AccessibilityList.cpp 1054 1055 accessibility/AccessibilityListBox.cpp -
trunk/Source/WebCore/ChangeLog
r202059 r202063 1 2016-06-14 Doug Russell <d_russell@apple.com> 2 3 AX: Form label text should be exposed as static text if it contains only static text 4 https://bugs.webkit.org/show_bug.cgi?id=158634 5 6 Reviewed by Chris Fleizach. 7 8 Use AccessibilityLabel to represent HTMLLabelElement to assistive technology. 9 AccessibilityLabel::containsOnlyStaticText() searches label subtree to evaluate 10 if all children are static text. 11 AccessibilityLabel::stringValue() consults containsOnlyStaticText() and returns 12 textUnderElement() if true. 13 WebAccessibilityObjectWrapperMac consults containsOnlyStaticText() and substitutes 14 StaticTextRole for LabelRole if true. 15 Cache containsOnlyStaticText() in the common case when updating children. 16 17 Tests: accessibility/mac/label-element-all-text-string-value.html 18 accessibility/mac/label-element-with-link-string-value.html 19 20 * CMakeLists.txt: 21 * WebCore.xcodeproj/project.pbxproj: 22 * accessibility/AXObjectCache.cpp: 23 (WebCore::createFromRenderer): 24 * accessibility/AccessibilityAllInOne.cpp: 25 * accessibility/AccessibilityLabel.cpp: Added. 26 (WebCore::AccessibilityLabel::AccessibilityLabel): 27 (WebCore::AccessibilityLabel::~AccessibilityLabel): 28 (WebCore::AccessibilityLabel::create): 29 (WebCore::AccessibilityLabel::computeAccessibilityIsIgnored): 30 (WebCore::AccessibilityLabel::stringValue): 31 (WebCore::childrenContainOnlyStaticText): 32 (WebCore::AccessibilityLabel::containsOnlyStaticText): 33 (WebCore::AccessibilityLabel::updateChildrenIfNecessary): 34 (WebCore::AccessibilityLabel::clearChildren): 35 (WebCore::AccessibilityLabel::insertChild): 36 * accessibility/AccessibilityLabel.h: Added. 37 * accessibility/AccessibilityObject.h: 38 (WebCore::AccessibilityObject::isLabel): 39 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: 40 (-[WebAccessibilityObjectWrapper role]): 41 1 42 2016-06-14 Commit Queue <commit-queue@webkit.org> 2 43 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r202023 r202063 6776 6776 F50664F8157F52DC00AC226F /* FormController.h in Headers */ = {isa = PBXBuildFile; fileRef = F50664F6157F52DC00AC226F /* FormController.h */; }; 6777 6777 F513A3EA15FF4841001526DB /* ValidationMessageClient.h in Headers */ = {isa = PBXBuildFile; fileRef = F513A3E915FF4841001526DB /* ValidationMessageClient.h */; }; 6778 F52A8FD71D0A8D0E0073CF42 /* AccessibilityLabel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F52A8FD51D0A88010073CF42 /* AccessibilityLabel.cpp */; }; 6778 6779 F52AD5E41534245F0059FBE6 /* EmptyClients.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F52AD5E31534245F0059FBE6 /* EmptyClients.cpp */; }; 6779 6780 F544F78815CFB2A800AF33A8 /* PlatformLocale.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F544F78615CFB2A800AF33A8 /* PlatformLocale.cpp */; }; … … 14872 14873 F523D30302DE4476018635CA /* Range.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Range.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 14873 14874 F523D30402DE4476018635CA /* Range.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = Range.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 14875 F52A8FD51D0A88010073CF42 /* AccessibilityLabel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityLabel.cpp; sourceTree = "<group>"; }; 14876 F52A8FD61D0A88010073CF42 /* AccessibilityLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityLabel.h; sourceTree = "<group>"; }; 14874 14877 F52AD5E31534245F0059FBE6 /* EmptyClients.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EmptyClients.cpp; sourceTree = "<group>"; }; 14875 14878 F544F78615CFB2A800AF33A8 /* PlatformLocale.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformLocale.cpp; sourceTree = "<group>"; }; … … 16521 16524 2981CAA0131822EC00D12F2A /* AccessibilityImageMapLink.cpp */, 16522 16525 29A8121D0FBB9C1D00510293 /* AccessibilityImageMapLink.h */, 16526 F52A8FD51D0A88010073CF42 /* AccessibilityLabel.cpp */, 16527 F52A8FD61D0A88010073CF42 /* AccessibilityLabel.h */, 16523 16528 2981CAA1131822EC00D12F2A /* AccessibilityList.cpp */, 16524 16529 29A8120E0FBB9C1D00510293 /* AccessibilityList.h */, … … 29778 29783 93C09A7F0B064EEF005ABD4D /* EventHandlerMac.mm in Sources */, 29779 29784 AD4495F3141FC08900541EDF /* EventListenerMap.cpp in Sources */, 29785 F52A8FD71D0A8D0E0073CF42 /* AccessibilityLabel.cpp in Sources */, 29780 29786 C400D10918F1C8F60090D863 /* EventLoopInput.cpp in Sources */, 29781 29787 99CC0B5018BE9849006CEBCC /* EventLoopInputDispatcher.cpp in Sources */, -
trunk/Source/WebCore/accessibility/AXObjectCache.cpp
r201667 r202063 38 38 #include "AccessibilityAttachment.h" 39 39 #include "AccessibilityImageMapLink.h" 40 #include "AccessibilityLabel.h" 40 41 #include "AccessibilityList.h" 41 42 #include "AccessibilityListBox.h" … … 428 429 if (nodeHasRole(node, "treeitem")) 429 430 return AccessibilityTreeItem::create(renderer); 431 432 if (node && is<HTMLLabelElement>(node)) 433 return AccessibilityLabel::create(renderer); 430 434 431 435 #if ENABLE(VIDEO) -
trunk/Source/WebCore/accessibility/AccessibilityAllInOne.cpp
r198942 r202063 32 32 #include "AccessibilityAttachment.cpp" 33 33 #include "AccessibilityImageMapLink.cpp" 34 #include "AccessibilityLabel.cpp" 34 35 #include "AccessibilityList.cpp" 35 36 #include "AccessibilityListBox.cpp" -
trunk/Source/WebCore/accessibility/AccessibilityObject.h
r200677 r202063 513 513 virtual bool isInputSlider() const { return false; } 514 514 virtual bool isControl() const { return false; } 515 virtual bool isLabel() const { return false; } 515 516 virtual bool isList() const { return false; } 516 517 virtual bool isTable() const { return false; } -
trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
r201087 r202063 34 34 #import "AXObjectCache.h" 35 35 #import "AccessibilityARIAGridRow.h" 36 #import "AccessibilityLabel.h" 36 37 #import "AccessibilityList.h" 37 38 #import "AccessibilityListBox.h" … … 2233 2234 #pragma clang diagnostic pop 2234 2235 AccessibilityRole role = m_object->roleValue(); 2236 2237 if (role == LabelRole && is<AccessibilityLabel>(*m_object) && downcast<AccessibilityLabel>(*m_object).containsOnlyStaticText()) 2238 role = StaticTextRole; 2239 2235 2240 if (role == CanvasRole && m_object->canvasHasFallbackContent()) 2236 2241 role = GroupRole;
Note: See TracChangeset
for help on using the changeset viewer.