Changeset 216457 in webkit
- Timestamp:
- May 8, 2017 3:16:27 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r216456 r216457 1 2017-05-08 Joanmarie Diggs <jdiggs@igalia.com> 2 3 AX: don't expose empty roledescription 4 https://bugs.webkit.org/show_bug.cgi?id=163647 5 6 Reviewed by Chris Fleizach. 7 8 * accessibility/aria-roledescription-expected.txt: New test cases, updated expectations. 9 * accessibility/aria-roledescription.html: New test cases, updated expectations. 10 * platform/gtk/accessibility/aria-roledescription-expected.txt: New test cases, updated expectations. 11 1 12 2017-05-08 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/LayoutTests/accessibility/aria-roledescription-expected.txt
r186038 r216457 5 5 6 6 7 Role description: AXRoleDescription: Super Button 8 Role description: AXRoleDescription: 9 Role description: AXRoleDescription: button 7 Role description: AXRoleDescription: Super Button. 8 Role description: AXRoleDescription: button. 9 Role description: AXRoleDescription: button. 10 Role description: AXRoleDescription: Super Button. 11 Role description: AXRoleDescription: button. 10 12 PASS successfullyParsed is true 11 13 -
trunk/LayoutTests/accessibility/aria-roledescription.html
r186038 r216457 18 18 19 19 // Confirm we can override our role description. 20 debug("Role description: " + accessibilityController.accessibleElementById("btn").roleDescription );20 debug("Role description: " + accessibilityController.accessibleElementById("btn").roleDescription + "."); 21 21 22 // Confirm our role description is emptywhen set to zero length.22 // Confirm our role description returns to default when set to zero length. 23 23 document.getElementById("btn").setAttribute("aria-roledescription", ""); 24 debug("Role description: " + accessibilityController.accessibleElementById("btn").roleDescription); 24 debug("Role description: " + accessibilityController.accessibleElementById("btn").roleDescription + "."); 25 26 // Confirm our role description returns to default when set to whitespace only. 27 document.getElementById("btn").setAttribute("aria-roledescription", " "); 28 debug("Role description: " + accessibilityController.accessibleElementById("btn").roleDescription + "."); 29 30 // Confirm our role description strips extraneous whitespace characters. 31 document.getElementById("btn").setAttribute("aria-roledescription", " Super Button "); 32 debug("Role description: " + accessibilityController.accessibleElementById("btn").roleDescription + "."); 25 33 26 34 // Confirm our role description returns to default when removed. 27 35 document.getElementById("btn").removeAttribute("aria-roledescription"); 28 debug("Role description: " + accessibilityController.accessibleElementById("btn").roleDescription );36 debug("Role description: " + accessibilityController.accessibleElementById("btn").roleDescription + "."); 29 37 } 30 38 } -
trunk/LayoutTests/platform/gtk/accessibility/aria-roledescription-expected.txt
r200245 r216457 5 5 6 6 7 Role description: AXRoleDescription: Super Button 8 Role description: AXRoleDescription: 9 Role description: AXRoleDescription: 7 Role description: AXRoleDescription: Super Button. 8 Role description: AXRoleDescription: . 9 Role description: AXRoleDescription: . 10 Role description: AXRoleDescription: Super Button. 11 Role description: AXRoleDescription: . 10 12 PASS successfullyParsed is true 11 13 -
trunk/Source/WebCore/ChangeLog
r216456 r216457 1 2017-05-08 Joanmarie Diggs <jdiggs@igalia.com> 2 3 AX: don't expose empty roledescription 4 https://bugs.webkit.org/show_bug.cgi?id=163647 5 6 Reviewed by Chris Fleizach. 7 8 If the value of aria-roledescription is empty or contains only whitespace 9 characters, ignore the value. Also strip out leading or trailing whitespace 10 characters in the value. 11 12 No new tests: We already had coverage for an empty aria-roledescription value. 13 That test was updated to reflect the new behavior. New test cases were added 14 to cover a value that contains only whitespace characters, and a value with 15 leading and trailing whitespace characters. 16 17 * accessibility/AccessibilityObject.cpp: 18 (WebCore::AccessibilityObject::roleDescription): 19 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: 20 (-[WebAccessibilityObjectWrapper roleDescription]): 21 1 22 2017-05-08 Chris Dumez <cdumez@apple.com> 2 23 -
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
r216102 r216457 2333 2333 String AccessibilityObject::roleDescription() const 2334 2334 { 2335 return getAttribute(aria_roledescriptionAttr);2335 return stripLeadingAndTrailingHTMLSpaces(getAttribute(aria_roledescriptionAttr)); 2336 2336 } 2337 2337 -
trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
r216452 r216457 2208 2208 2209 2209 const AtomicString& overrideRoleDescription = m_object->roleDescription(); 2210 if (!overrideRoleDescription.isNull() )2210 if (!overrideRoleDescription.isNull() && !overrideRoleDescription.isEmpty()) 2211 2211 return overrideRoleDescription; 2212 2212
Note: See TracChangeset
for help on using the changeset viewer.