Changeset 204708 in webkit
- Timestamp:
- Aug 22, 2016 6:33:00 AM (8 years ago)
- Location:
- releases/WebKitGTK/webkit-2.12
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog
r204707 r204708 1 2016-05-25 Joanmarie Diggs <jdiggs@igalia.com> 2 3 [GTK] accessibility/meter-element.html is failing 4 https://bugs.webkit.org/show_bug.cgi?id=115633 5 6 Unreviewed. 7 8 Seven new test cases were added to meter-element.html for additional 9 coverage. Also updated the ATK expectations for spinbutton-value.html 10 to reflect that we are now exposing the value of aria-valuetext. 11 12 * accessibility/meter-element.html: New test cases added. 13 * platform/gtk/TestExpectations: Unskip the previously-failing test. 14 * platform/gtk/accessibility/meter-element-expected.txt: Updated. 15 * platform/gtk/accessibility/spinbutton-value-expected.txt: Updated. 16 * platform/mac/accessibility/meter-element-expected.txt: Updated. 17 1 18 2016-05-25 Joanmarie Diggs <jdiggs@igalia.com> 2 19 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/meter-element.html
r155653 r204708 12 12 <meter id="meter6" min=0 max=20 value=12 title="centimeters">12cm</meter> 13 13 <meter id="meter7" min=0 max=10 value=2 title="centimeters">2cm</meter> 14 <meter id="meter8" value=0.75><img aria-label="75 out of 100" src="graph75.png"></meter> 15 <meter id="meter9" value=0.75><img aria-label="75 out of 100" aria-labelledby="label" src="graph75.png"></meter> 16 <meter id="meter10" value=0.75><img aria-labelledby="label" src="graph75.png"></meter> 17 <span id="label" style="color:green;">75 percent</span> 18 <meter id="meter11" value=0.75><img aria-labelledby="label1 label2" src="graph75.png"></meter> 19 <span id="label1" style="color:green;">75</span> 20 <span id="label2" style="color:green;">(100 total)</span> 21 <meter id="meter12" value=0.75><span style="color:green;">75 (out of 100 total)</span></meter> 22 <meter id="meter13" value=0.75><div><p><span style="color:green;">75 (out of 100 total)</span></p></div></meter> 23 <meter id="meter14" value=0.60><div aria-label="7 of 10"><span style="color:green;">■■■■■■</span><span>□□□□</span></div></meter> 14 24 </div> 15 25 … … 20 30 21 31 if (window.testRunner && window.accessibilityController) { 22 for (var k = 1; k < 8; k++) {32 for (var k = 1; k < 15; k++) { 23 33 var meter = accessibilityController.accessibleElementById("meter" + k); 24 34 debug("Meter" + k); -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/TestExpectations
r204707 r204708 2036 2036 2037 2037 webkit.org/b/115437 fast/text/complex-initial-advance.html [ ImageOnlyFailure ] 2038 2039 webkit.org/b/115633 accessibility/meter-element.html [ Failure ]2040 2038 2041 2039 webkit.org/b/116153 fast/css/text-overflow-ellipsis-full-truncate-rtl.html [ ImageOnlyFailure ] -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/meter-element-expected.txt
r189467 r204708 1 CONSOLE MESSAGE: line 25: TypeError: undefined is not an object (evaluating 'meter.role')2 3 1 This tests that the meter element is accessible. 4 2 … … 7 5 8 6 Meter1 9 FAIL successfullyParsed should be true (of type boolean). Was undefined (of type undefined). 7 AXRole: AXProgressIndicator 8 AXTitle: 9 AXDescription: 10 AXValueDescription: 6 blocks used (out of 8 total) 11 AXValueSettable: false 12 13 14 Meter2 15 AXRole: AXProgressIndicator 16 AXTitle: 17 AXDescription: 18 AXValueDescription: 75% 19 AXValueSettable: false 20 21 22 Meter3 23 AXRole: AXProgressIndicator 24 AXTitle: 25 AXDescription: 26 AXValueDescription: 27 AXValueSettable: false 28 29 30 Meter4 31 AXRole: AXProgressIndicator 32 AXTitle: 33 AXDescription: 34 AXValueDescription: 12cm 35 AXValueSettable: false 36 37 38 Meter5 39 AXRole: AXProgressIndicator 40 AXTitle: 41 AXDescription: 42 AXValueDescription: 2cm 43 AXValueSettable: false 44 45 46 Meter6 47 AXRole: AXProgressIndicator 48 AXTitle: 49 AXDescription: centimeters 50 AXValueDescription: 12cm 51 AXValueSettable: false 52 53 54 Meter7 55 AXRole: AXProgressIndicator 56 AXTitle: 57 AXDescription: centimeters 58 AXValueDescription: 2cm 59 AXValueSettable: false 60 61 62 Meter8 63 AXRole: AXProgressIndicator 64 AXTitle: 65 AXDescription: 66 AXValueDescription: 75 out of 100 67 AXValueSettable: false 68 69 70 Meter9 71 AXRole: AXProgressIndicator 72 AXTitle: 73 AXDescription: 74 AXValueDescription: 75 percent 75 AXValueSettable: false 76 77 78 Meter10 79 AXRole: AXProgressIndicator 80 AXTitle: 81 AXDescription: 82 AXValueDescription: 75 percent 83 AXValueSettable: false 84 85 86 Meter11 87 AXRole: AXProgressIndicator 88 AXTitle: 89 AXDescription: 90 AXValueDescription: 75 (100 total) 91 AXValueSettable: false 92 93 94 Meter12 95 AXRole: AXProgressIndicator 96 AXTitle: 97 AXDescription: 98 AXValueDescription: 75 (out of 100 total) 99 AXValueSettable: false 100 101 102 Meter13 103 AXRole: AXProgressIndicator 104 AXTitle: 105 AXDescription: 106 AXValueDescription: 75 (out of 100 total) 107 AXValueSettable: false 108 109 110 Meter14 111 AXRole: AXProgressIndicator 112 AXTitle: 113 AXDescription: 114 AXValueDescription: 7 of 10 115 AXValueSettable: false 116 117 118 PASS successfullyParsed is true 10 119 11 120 TEST COMPLETE -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/spinbutton-value-expected.txt
r189467 r204708 9 9 PASS endsWith(axSpin.minValue, '1') is true 10 10 PASS endsWith(axSpin.maxValue, '9') is true 11 FAIL endsWith(axSpin.valueDescription, '5 of 9') should be true. Was false. 11 PASS endsWith(axSpin.valueDescription, '5 of 9') is true 12 12 PASS axSpin.title is axUntitled.title 13 13 PASS successfullyParsed is true -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/mac/accessibility/meter-element-expected.txt
r155653 r204708 60 60 61 61 62 Meter8 63 AXRole: AXProgressIndicator 64 AXTitle: 65 AXDescription: 66 AXValueDescription: 75 out of 100 67 AXValueSettable: false 68 69 70 Meter9 71 AXRole: AXProgressIndicator 72 AXTitle: 73 AXDescription: 74 AXValueDescription: 75 percent 75 AXValueSettable: false 76 77 78 Meter10 79 AXRole: AXProgressIndicator 80 AXTitle: 81 AXDescription: 82 AXValueDescription: 75 percent 83 AXValueSettable: false 84 85 86 Meter11 87 AXRole: AXProgressIndicator 88 AXTitle: 89 AXDescription: 90 AXValueDescription: 75 (100 total) 91 AXValueSettable: false 92 93 94 Meter12 95 AXRole: AXProgressIndicator 96 AXTitle: 97 AXDescription: 98 AXValueDescription: 75 (out of 100 total) 99 AXValueSettable: false 100 101 102 Meter13 103 AXRole: AXProgressIndicator 104 AXTitle: 105 AXDescription: 106 AXValueDescription: 75 (out of 100 total) 107 AXValueSettable: false 108 109 110 Meter14 111 AXRole: AXProgressIndicator 112 AXTitle: 113 AXDescription: 114 AXValueDescription: 7 of 10 115 AXValueSettable: false 116 117 62 118 PASS successfullyParsed is true 63 119 -
releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog
r204707 r204708 1 2016-05-25 Joanmarie Diggs <jdiggs@igalia.com> 2 3 [GTK] accessibility/meter-element.html is failing 4 https://bugs.webkit.org/show_bug.cgi?id=115633 5 6 Unreviewed. 7 8 The meter's value description should be exposed in the same fashion 9 as (we should have been exposing) aria-valuetext, namely through the 10 "valuetext" AtkObject attribute. This exposure is now in place. Also 11 implement AccessibilityProgressIndicator::valueDescription() so that 12 the ports do not have to special-case meter in the platform wrappers. 13 Map the meter element to the correct role (ATK_ROLE_LEVEL_BAR), and 14 ignore a previously-included accessible object resulting from the 15 use of the title attribute on a meter. Finally, do not expose the 16 meter's title as the accessible name because the HTML spec suggests 17 authors can supply the numeric unit as the value of title. 18 19 No new test file as the failure was identified by meter-element.html. 20 Seven new test cases were added for additional coverage. Also updated 21 the ATK expectations for spinbutton-value.html to reflect that we are now 22 exposing the value of aria-valuetext. 23 24 * accessibility/AccessibilityNodeObject.cpp: 25 (WebCore::AccessibilityNodeObject::helpText): 26 (WebCore::AccessibilityNodeObject::accessibilityDescriptionForChildren): 27 (WebCore::AccessibilityNodeObject::visibleText): 28 * accessibility/AccessibilityNodeObject.h: 29 * accessibility/AccessibilityProgressIndicator.cpp: 30 (WebCore::AccessibilityProgressIndicator::valueDescription): 31 * accessibility/AccessibilityProgressIndicator.h: 32 * accessibility/AccessibilityRenderObject.cpp: 33 (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored): 34 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: 35 (webkitAccessibleGetAttributes): 36 (atkRole): 37 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: 38 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): 39 1 40 2016-05-25 Joanmarie Diggs <jdiggs@igalia.com> 2 41 -
releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityNodeObject.cpp
r201270 r204708 1355 1355 case SwitchRole: 1356 1356 case TabRole: 1357 case ProgressIndicatorRole:1358 1357 useTextUnderElement = true; 1359 1358 break; … … 1396 1395 1397 1396 // The title attribute should be used as help text unless it is already being used as descriptive text. 1397 // However, when the title attribute is the only text alternative provided, it may be exposed as the 1398 // descriptive text. This is problematic in the case of meters because the HTML spec suggests authors 1399 // can expose units through this attribute. Therefore, if the element is a meter, change its source 1400 // type to HelpText. 1398 1401 const AtomicString& title = getAttribute(titleAttr); 1399 if (!title.isEmpty()) 1400 textOrder.append(AccessibilityText(title, TitleTagText)); 1402 if (!title.isEmpty()) { 1403 if (!isMeter()) 1404 textOrder.append(AccessibilityText(title, TitleTagText)); 1405 else 1406 textOrder.append(AccessibilityText(title, HelpText)); 1407 } 1401 1408 } 1402 1409 … … 1894 1901 } 1895 1902 1903 String AccessibilityNodeObject::accessibilityDescriptionForChildren() const 1904 { 1905 Node* node = this->node(); 1906 if (!node) 1907 return String(); 1908 1909 AXObjectCache* cache = axObjectCache(); 1910 if (!cache) 1911 return String(); 1912 1913 StringBuilder builder; 1914 for (Node* child = node->firstChild(); child; child = child->nextSibling()) { 1915 if (!is<Element>(child)) 1916 continue; 1917 1918 if (AccessibilityObject* axObject = cache->getOrCreate(child)) { 1919 String description = axObject->ariaLabeledByAttribute(); 1920 if (description.isEmpty()) 1921 description = accessibleNameForNode(child); 1922 appendNameToStringBuilder(builder, description); 1923 } 1924 } 1925 1926 return builder.toString(); 1927 } 1928 1896 1929 String AccessibilityNodeObject::accessibilityDescriptionForElements(Vector<Element*> &elements) const 1897 1930 { -
releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityNodeObject.h
r201270 r204708 124 124 virtual unsigned hierarchicalLevel() const override; 125 125 virtual String textUnderElement(AccessibilityTextUnderElementMode = AccessibilityTextUnderElementMode()) const override; 126 virtual String accessibilityDescriptionForChildren() const; 126 127 virtual String accessibilityDescription() const override; 127 128 virtual String helpText() const override; -
releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityProgressIndicator.cpp
r177733 r204708 22 22 #include "AccessibilityProgressIndicator.h" 23 23 24 #include "AXObjectCache.h" 24 25 #include "FloatConversion.h" 25 26 #include "HTMLMeterElement.h" … … 61 62 } 62 63 64 String AccessibilityProgressIndicator::valueDescription() const 65 { 66 // If the author has explicitly provided a value through aria-valuetext, use it. 67 String description = AccessibilityRenderObject::valueDescription(); 68 if (!description.isEmpty()) 69 return description; 70 71 #if ENABLE(METER_ELEMENT) 72 if (!m_renderer->isMeter()) 73 return String(); 74 75 HTMLMeterElement* meter = meterElement(); 76 if (!meter) 77 return String(); 78 79 // The HTML spec encourages authors to include a textual representation of the meter's state in 80 // the element's contents. We'll fall back on that if there is not a more accessible alternative. 81 AccessibilityObject* axMeter = axObjectCache()->getOrCreate(meter); 82 if (is<AccessibilityNodeObject>(axMeter)) { 83 description = downcast<AccessibilityNodeObject>(axMeter)->accessibilityDescriptionForChildren(); 84 if (!description.isEmpty()) 85 return description; 86 } 87 88 return meter->textContent(); 89 #endif 90 91 return String(); 92 } 93 63 94 float AccessibilityProgressIndicator::valueForRange() const 64 95 { -
releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityProgressIndicator.h
r177733 r204708 47 47 virtual bool isProgressIndicator() const override { return true; } 48 48 49 virtual String valueDescription() const override; 49 50 virtual float valueForRange() const override; 50 51 virtual float maxValueForRange() const override; -
releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r201270 r204708 1367 1367 return false; 1368 1368 1369 #if ENABLE(METER_ELEMENT) 1370 // The render tree of meter includes a RenderBlock (meter) and a RenderMeter (div). 1371 // We expose the latter and thus should ignore the former. However, if the author 1372 // includes a title attribute on the element, hasAttributesRequiredForInclusion() 1373 // will return true, potentially resulting in a redundant accessible object. 1374 if (is<HTMLMeterElement>(node)) 1375 return true; 1376 #endif 1377 1369 1378 // Using the presence of an accessible name to decide an element's visibility is not 1370 1379 // as definitive as previous checks, so this should remain as one of the last. -
releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
r204707 r204708 427 427 if (!isReadOnly.isEmpty()) 428 428 attributeSet = addToAtkAttributeSet(attributeSet, "readonly", isReadOnly.utf8().data()); 429 430 String valueDescription = coreObject->valueDescription(); 431 if (!valueDescription.isEmpty()) 432 attributeSet = addToAtkAttributeSet(attributeSet, "valuetext", valueDescription.utf8().data()); 429 433 430 434 // According to the W3C Core Accessibility API Mappings 1.1, section 5.4.1 General Rules: … … 514 518 return ATK_ROLE_PROGRESS_BAR; // Is this right? 515 519 case ProgressIndicatorRole: 516 // return ATK_ROLE_SPIN_BUTTON; // Some confusion about this role in AccessibilityRenderObject.cpp 517 return ATK_ROLE_PROGRESS_BAR; 520 return coreObject->isMeter() ? ATK_ROLE_LEVEL_BAR : ATK_ROLE_PROGRESS_BAR; 518 521 case WindowRole: 519 522 return ATK_ROLE_WINDOW; -
releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
r196699 r204708 3127 3127 } 3128 3128 3129 if ([attributeName isEqualToString:NSAccessibilityValueDescriptionAttribute]) { 3130 if (m_object->isMeter()) 3131 return [self baseAccessibilityTitle]; 3132 3129 if ([attributeName isEqualToString:NSAccessibilityValueDescriptionAttribute]) 3133 3130 return m_object->valueDescription(); 3134 }3135 3131 3136 3132 if ([attributeName isEqualToString:NSAccessibilityOrientationAttribute]) { -
releases/WebKitGTK/webkit-2.12/Tools/ChangeLog
r204707 r204708 1 2016-05-25 Joanmarie Diggs <jdiggs@igalia.com> 2 3 [GTK] accessibility/meter-element.html is failing 4 https://bugs.webkit.org/show_bug.cgi?id=115633 5 6 Unreviewed. 7 8 Implement AccessibilityUIElement::valueDescription() and add mapping 9 from ATK_ROLE_LEVEL_BAR to AXProgressIndicator. 10 11 * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: 12 (WTR::AccessibilityUIElement::valueDescription): 13 1 14 2016-05-25 Joanmarie Diggs <jdiggs@igalia.com> 2 15 -
releases/WebKitGTK/webkit-2.12/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp
r204707 r204708 380 380 case ATK_ROLE_LABEL: 381 381 return "AXLabel"; 382 case ATK_ROLE_LEVEL_BAR: 383 return "AXProgressIndicator"; 382 384 case ATK_ROLE_LINK: 383 385 return "AXLink"; … … 1401 1403 JSRetainPtr<JSStringRef> AccessibilityUIElement::valueDescription() 1402 1404 { 1403 // FIXME: implement 1404 return JSStringCreateWithCharacters(0, 0); 1405 String valueText = getAttributeSetValueForId(ATK_OBJECT(m_element.get()), ObjectAttributeType, "valuetext"); 1406 GUniquePtr<gchar> valueDescription(g_strdup_printf("AXValueDescription: %s", valueText.utf8().data())); 1407 return JSStringCreateWithUTF8CString(valueDescription.get()); 1405 1408 } 1406 1409
Note: See TracChangeset
for help on using the changeset viewer.