Changeset 155022 in webkit
- Timestamp:
- Sep 3, 2013 11:13:39 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r155014 r155022 1 2013-09-03 Chris Fleizach <cfleizach@apple.com> 2 3 AX: REGRESSION: @title is exposed as AXDescription when label label from contents already exists. 4 https://bugs.webkit.org/show_bug.cgi?id=120550 5 6 Reviewed by Mario Sanchez Prada. 7 8 * accessibility/image-map1.html: 9 * platform/mac/accessibility/document-links-expected.txt: 10 * platform/mac/accessibility/image-map1-expected.txt: 11 * platform/mac/accessibility/link-with-title-expected.txt: Added. 12 * platform/mac/accessibility/link-with-title.html: Added. 13 1 14 2013-09-03 Enrica Casucci <enrica@apple.com> 2 15 -
trunk/LayoutTests/accessibility/image-map1.html
r120111 r155022 22 22 <div id="console"></div> 23 23 24 24 <script> 25 25 description("This tests that you can reach the links within an image map."); 26 26 … … 29 29 30 30 var body = accessibilityController.focusedElement; 31 shouldBe("body.childAtIndex(0).role", "'AXRole: AXLink'"); 32 shouldBe("body.childAtIndex(0).title", "'AXTitle: Link1'"); 33 34 shouldBe("body.childAtIndex(1).role", "'AXRole: AXLink'"); 35 shouldBe("body.childAtIndex(1).title", "'AXTitle: Link2'"); 36 37 shouldBe("body.childAtIndex(2).role", "'AXRole: AXLink'"); 38 shouldBe("body.childAtIndex(2).title", "'AXTitle: Link3'"); 39 } 31 for (var k = 0; k < 3; k++) { 32 var link = body.childAtIndex(k); 33 debug("Link" + (k + 1) + " role: " + link.role); 34 debug("Link" + (k + 1) + " title: " + link.title); 35 debug("Link" + (k + 1) + " description: " + link.description + "\n"); 36 } 37 } 40 38 </script> 41 39 -
trunk/LayoutTests/platform/mac/accessibility/document-links-expected.txt
r154283 r155022 6 6 AXChildren: <array of size 0> 7 7 AXHelp: 8 AXParent: <AXLink : 'Link1'>8 AXParent: <AXLink> 9 9 AXSize: NSSize: {123, 62} 10 AXTitle: Link111 AXDescription: 10 AXTitle: 11 AXDescription: Link1 12 12 AXValue: 13 13 AXFocused: 0 14 14 AXEnabled: 1 15 AXWindow: <AXLink : 'Link1'>15 AXWindow: <AXLink> 16 16 AXSelectedTextMarkerRange: (null) 17 17 AXStartTextMarker: (null) … … 21 21 AXSelected: 0 22 22 AXBlockQuoteLevel: 0 23 AXTopLevelUIElement: <AXLink : 'Link1'>23 AXTopLevelUIElement: <AXLink> 24 24 AXLanguage: 25 25 AXURL: http://www.apple.com/ 26 26 AXAccessKey: (null) 27 27 AXARIABusy: 0 28 AXPath: <AXLink : 'Link1'>28 AXPath: <AXLink> 29 29 30 30 ------------ … … 34 34 AXChildren: <array of size 0> 35 35 AXHelp: 36 AXParent: <AXLink : 'Link2'>36 AXParent: <AXLink> 37 37 AXSize: NSSize: {113, 22} 38 AXTitle: Link239 AXDescription: 38 AXTitle: 39 AXDescription: Link2 40 40 AXValue: 41 41 AXFocused: 0 42 42 AXEnabled: 1 43 AXWindow: <AXLink : 'Link2'>43 AXWindow: <AXLink> 44 44 AXSelectedTextMarkerRange: (null) 45 45 AXStartTextMarker: (null) … … 49 49 AXSelected: 0 50 50 AXBlockQuoteLevel: 0 51 AXTopLevelUIElement: <AXLink : 'Link2'>51 AXTopLevelUIElement: <AXLink> 52 52 AXLanguage: 53 53 AXURL: http://www.apple.com/ 54 54 AXAccessKey: (null) 55 55 AXARIABusy: 0 56 AXPath: <AXLink : 'Link2'>56 AXPath: <AXLink> 57 57 58 58 ------------ -
trunk/LayoutTests/platform/mac/accessibility/image-map1-expected.txt
r58794 r155022 5 5 6 6 7 PASS body.childAtIndex(0).role is 'AXRole: AXLink' 8 PASS body.childAtIndex(0).title is 'AXTitle: Link1' 9 PASS body.childAtIndex(1).role is 'AXRole: AXLink' 10 PASS body.childAtIndex(1).title is 'AXTitle: Link2' 11 PASS body.childAtIndex(2).role is 'AXRole: AXLink' 12 PASS body.childAtIndex(2).title is 'AXTitle: Link3' 7 Link1 role: AXRole: AXLink 8 Link1 title: AXTitle: 9 Link1 description: AXDescription: Link1 10 11 Link2 role: AXRole: AXLink 12 Link2 title: AXTitle: 13 Link2 description: AXDescription: Link2 14 15 Link3 role: AXRole: AXLink 16 Link3 title: AXTitle: 17 Link3 description: AXDescription: Link3 18 13 19 PASS successfullyParsed is true 14 20 -
trunk/Source/WebCore/ChangeLog
r155019 r155022 1 2013-09-03 Chris Fleizach <cfleizach@apple.com> 2 3 AX: REGRESSION: @title is exposed as AXDescription when label label from contents already exists. 4 https://bugs.webkit.org/show_bug.cgi?id=120550 5 6 Reviewed by Mario Sanchez Prada. 7 8 Resolve a FIXME from the accessible name computation refactoring so that alternative text for links do not 9 show up in the title field and do not duplicate naming when a title tag is used. 10 11 Effectively, this means that links no longer use AXTitle for alternative text. They use AXDescription 12 like all other elements. 13 14 Test: platform/mac/accessibility/link-with-title.html 15 16 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: 17 (-[WebAccessibilityObjectWrapper accessibilityTitle]): 18 (-[WebAccessibilityObjectWrapper accessibilityDescription]): 19 1 20 2013-09-03 Darin Adler <darin@apple.com> 2 21 -
trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
r154963 r155022 1972 1972 } 1973 1973 1974 // FIXME: Different kinds of elements are putting the title tag to use in different1975 // AX fields. This should be rectified, but in the initial patch I want to achieve1976 // parity with existing behavior.1977 - (BOOL)titleTagShouldBeUsedInDescriptionField1978 {1979 return (m_object->isLink() && !m_object->isImageMapLink()) || m_object->isImage();1980 }1981 1982 1974 // This should be the "visible" text that's actually on the screen if possible. 1983 1975 // If there's alternative text, that can override the title. … … 2013 2005 if (text.textSource == LabelByElementText && !m_object->exposesTitleUIElement()) 2014 2006 return text.text; 2015 2016 // FIXME: The title tag is used in certain cases for the title. This usage should2017 // probably be in the description field since it's not "visible".2018 if (text.textSource == TitleTagText && ![self titleTagShouldBeUsedInDescriptionField])2019 return text.text;2020 2007 } 2021 2008 … … 2034 2021 2035 2022 unsigned length = textOrder.size(); 2023 bool visibleTextAvailable = false; 2036 2024 for (unsigned k = 0; k < length; k++) { 2037 2025 const AccessibilityText& text = textOrder[k]; … … 2040 2028 return text.text; 2041 2029 2042 if (text.textSource == TitleTagText && [self titleTagShouldBeUsedInDescriptionField]) 2030 switch (text.textSource) { 2031 case VisibleText: 2032 case ChildrenText: 2033 case LabelByElementText: 2034 visibleTextAvailable = true; 2035 default: 2036 break; 2037 } 2038 2039 if (text.textSource == TitleTagText && !visibleTextAvailable) 2043 2040 return text.text; 2044 2041 }
Note: See TracChangeset
for help on using the changeset viewer.