Source/WebCore/ChangeLog

 12021-03-25 Andres Gonzalez <andresg_22@apple.com>
 2
 3 AX: Consider implementing @aria-details.
 4 https://bugs.webkit.org/show_bug.cgi?id=165842
 5 rdar://30725491
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 Tests: accessibility/ios-simulator/aria-details.html
 10 accessibility/mac/aria-details.html
 11
 12 - Added [WebAccessibilityObjectWrapper accessibilityDetailsElements] on iOS.
 13 - Added helper function accessibleElementsForObjects to retrieve platform-
 14 specific accessible elements given a collection of AXCoreObjects.
 15
 16 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
 17 (accessibleElementsForObjects):
 18 (-[WebAccessibilityObjectWrapper accessibilityDetailsElements]):
 19 (-[WebAccessibilityObjectWrapper accessibilityErrorMessageElements]):
 20
1212021-03-24 Rob Buis <rbuis@igalia.com>
222
323 [css-grid] Do not allow negative heights

Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm

@@static void appendStringToResult(NSMutableString *result, NSString *string)
18661866 }).autorelease();
18671867}
18681868
 1869static NSArray *accessibleElementsForObjects(const AXCoreObject::AccessibilityChildrenVector& objects)
 1870{
 1871 AXCoreObject::AccessibilityChildrenVector accessibleElements;
 1872 for (const auto& object : objects) {
 1873 if (object) {
 1874 Accessibility::enumerateDescendants<AXCoreObject>(*object, true, [&accessibleElements] (AXCoreObject& descendant) {
 1875 if (descendant.wrapper().isAccessibilityElement)
 1876 accessibleElements.append(&descendant);
 1877 });
 1878 }
 1879 }
 1880
 1881 return convertToNSArray(accessibleElements);
 1882}
 1883
 1884- (NSArray *)accessibilityDetailsElements
 1885{
 1886 if (![self _prepareAccessibilityCall])
 1887 return nil;
 1888
 1889 AXCoreObject::AccessibilityChildrenVector detailsElements;
 1890 self.axBackingObject->ariaDetailsElements(detailsElements);
 1891 return accessibleElementsForObjects(detailsElements);
 1892}
 1893
18691894- (NSArray *)accessibilityErrorMessageElements
18701895{
18711896 if (![self _prepareAccessibilityCall])

@@static void appendStringToResult(NSMutableString *result, NSString *string)
18731898
18741899 AXCoreObject::AccessibilityChildrenVector errorElements;
18751900 self.axBackingObject->ariaErrorMessageElements(errorElements);
1876 
1877  AXCoreObject::AccessibilityChildrenVector accessibleElements;
1878  for (const auto& element : errorElements) {
1879  ASSERT(element);
1880  Accessibility::enumerateDescendants<AXCoreObject>(*element, true, [&accessibleElements] (AXCoreObject& descendant) {
1881  if (descendant.wrapper().isAccessibilityElement)
1882  accessibleElements.append(&descendant);
1883  });
1884  }
1885 
1886  return convertToNSArray(accessibleElements);
 1901 return accessibleElementsForObjects(errorElements);
18871902}
18881903
18891904- (id)accessibilityLinkedElement

Tools/ChangeLog

 12021-03-25 Andres Gonzalez <andresg_22@apple.com>
 2
 3 AX: Consider implementing @aria-details.
 4 https://bugs.webkit.org/show_bug.cgi?id=165842
 5 rdar://30725491
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 Added AccessibilityUIElement::detailsElements.
 10
 11 * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
 12 (WTR::AccessibilityUIElement::detailsElements const):
 13 * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
 14 * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
 15 * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
 16 (WTR::AccessibilityUIElement::detailsElements const):
 17 * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
 18 (WTR::AccessibilityUIElement::detailsElements const):
 19
1202021-03-23 Kate Cheney <katherine_cheney@apple.com>
221
322 Service worker loads are not marked as app-bound

Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp

@@RefPtr<AccessibilityTextMarker> AccessibilityUIElement::nextSentenceEndTextMarke
127127RefPtr<AccessibilityTextMarker> AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker(AccessibilityTextMarker*) { return nullptr; }
128128RefPtr<AccessibilityTextMarkerRange> AccessibilityUIElement::misspellingTextMarkerRange(AccessibilityTextMarkerRange*, bool) { return nullptr; }
129129void AccessibilityUIElement::dismiss() { }
 130JSValueRef AccessibilityUIElement::detailsElements() const { return { }; }
130131JSValueRef AccessibilityUIElement::errorMessageElements() const { return { }; }
131132JSRetainPtr<JSStringRef> AccessibilityUIElement::embeddedImageDescription() const { return nullptr; }
132133#endif

Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h

@@public:
225225 RefPtr<AccessibilityUIElement> disclosedRowAtIndex(unsigned);
226226 RefPtr<AccessibilityUIElement> rowAtIndex(unsigned);
227227
 228 JSValueRef detailsElements() const;
228229 JSValueRef errorMessageElements() const;
229230 // ARIA specific
230231 RefPtr<AccessibilityUIElement> ariaOwnsElementAtIndex(unsigned);

Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl

169169 object columnHeaders();
170170 object rowHeaders();
171171
 172 object detailsElements();
172173 object errorMessageElements();
173174 AccessibilityUIElement ariaOwnsElementAtIndex(unsigned long index);
174175 AccessibilityUIElement ariaOwnsReferencingElementAtIndex(unsigned long index);

Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm

@@typedef void (*AXPostedNotificationCallback)(id element, NSString* notification,
5050- (id)accessibilityElementForRow:(NSInteger)row andColumn:(NSInteger)column;
5151- (NSURL *)accessibilityURL;
5252- (NSArray *)accessibilityHeaderElements;
 53- (NSArray *)accessibilityDetailsElements;
5354- (NSArray *)accessibilityErrorMessageElements;
5455- (NSString *)accessibilityPlaceholderValue;
5556- (NSString *)stringForRange:(NSRange)range;

@@RefPtr<AccessibilityUIElement> AccessibilityUIElement::linkedUIElementAtIndex(un
270271 return nullptr;
271272}
272273
 274JSValueRef AccessibilityUIElement::detailsElements() const
 275{
 276 NSArray *elements = [m_element accessibilityDetailsElements];
 277 if ([elements isKindOfClass:NSArray.class])
 278 return makeJSArray(makeVector<RefPtr<AccessibilityUIElement>>(elements));
 279 return { };
 280}
 281
273282JSValueRef AccessibilityUIElement::errorMessageElements() const
274283{
275284 NSArray *elements = [m_element accessibilityErrorMessageElements];

Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm

@@RefPtr<AccessibilityUIElement> AccessibilityUIElement::linkedUIElementAtIndex(un
445445 return elementForAttributeAtIndex(NSAccessibilityLinkedUIElementsAttribute, index);
446446}
447447
 448JSValueRef AccessibilityUIElement::detailsElements() const
 449{
 450 BEGIN_AX_OBJC_EXCEPTIONS
 451 NSArray *elements = attributeValue(m_element.get(), @"AXDetailsElements");
 452 if ([elements isKindOfClass:NSArray.class])
 453 return makeJSArray(makeVector<RefPtr<AccessibilityUIElement>>(elements));
 454 END_AX_OBJC_EXCEPTIONS
 455
 456 return { };
 457}
 458
448459JSValueRef AccessibilityUIElement::errorMessageElements() const
449460{
450461 BEGIN_AX_OBJC_EXCEPTIONS

LayoutTests/ChangeLog

 12021-03-25 Andres Gonzalez <andresg_22@apple.com>
 2
 3 AX: Consider implementing @aria-details.
 4 https://bugs.webkit.org/show_bug.cgi?id=165842
 5 rdar://30725491
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 * accessibility/ios-simulator/aria-details-expected.txt: Added.
 10 * accessibility/ios-simulator/aria-details.html: Added.
 11 * accessibility/mac/aria-details-expected.txt: Added.
 12 * accessibility/mac/aria-details.html: Added.
 13 * platform/mac-wk1/TestExpectations:
 14
1152021-03-24 Chris Lord <clord@igalia.com>
216
317 [GLIB] imported/w3c/web-platform-tests/html/canvas/offscreen/manual/draw-generic-family/2d.text.draw.generic.family.w.html is flaky failing

LayoutTests/accessibility/ios-simulator/aria-details-expected.txt

 1
 2Details example
 3The Pythagorean Theorem is a relationship in Euclidean Geometry between the three sides of a right triangle, where the square of the hypotenuse is the sum of the squares of the two opposing sides.
 4
 5The following drawing illustrates an application of the Pythagorean Theorem when used to construct a skateboard ramp.
 6
 7In this example you will notice a skateboard ramp with a base and vertical board whose width is the width of the ramp. To compute how long the ramp must be, simply calculate the base length, square it, sum it with the square of the height of the ramp, and take the square root of the sum.
 8
 9See an Application of the Pythagorean Theorem.
 10
 11This verifies the exposure of aria-details.
 12
 13On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 14
 15
 16PASS details.length is 5
 17PASS details[0].description is 'AXLabel: Details example'
 18PASS details[2].description is 'AXLabel: The following drawing illustrates an application of the Pythagorean Theorem when used to construct a skateboard ramp.'
 19PASS details[4].description is 'AXLabel: Application of the Pythagorean Theorem'
 20PASS successfullyParsed is true
 21
 22TEST COMPLETE
 23

LayoutTests/accessibility/ios-simulator/aria-details.html

 1<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 2<html>
 3<head>
 4<script src="../../resources/js-test-pre.js"></script>
 5</head>
 6<body>
 7
 8<img id="image1" src="pythagorean.jpg" alt="Pythagorean Theorem" aria-details="details1 details2">
 9<details open id="details1">
 10 <summary>Details example</summary>
 11 <p>
 12 The Pythagorean Theorem is a relationship in Euclidean Geometry between the three sides of
 13 a right triangle, where the square of the hypotenuse is the sum of the squares of the two
 14 opposing sides.
 15 </p>
 16 <p>
 17 The following drawing illustrates an application of the Pythagorean Theorem when used to
 18 construct a skateboard ramp.
 19 </p>
 20 <p>
 21 In this example you will notice a skateboard ramp with a base and vertical board whose width
 22 is the width of the ramp. To compute how long the ramp must be, simply calculate the
 23 base length, square it, sum it with the square of the height of the ramp, and take the
 24 square root of the sum.
 25 </p>
 26</details>
 27<p>See an <a href="http://foo.com/pt.html" id="details2">Application of the Pythagorean Theorem</a>.</p>
 28
 29<p id="description"></p>
 30<div id="console"></div>
 31
 32<script>
 33 description("This verifies the exposure of aria-details.");
 34
 35 if (window.accessibilityController) {
 36 image1 = accessibilityController.accessibleElementById("image1");
 37 details = image1.detailsElements();
 38 shouldBe("details.length", "5");
 39 shouldBe("details[0].description", "'AXLabel: Details example'");
 40 shouldBe("details[2].description", "'AXLabel: The following drawing illustrates an application of the Pythagorean Theorem when used to construct a skateboard ramp.'");
 41 shouldBe("details[4].description", "'AXLabel: Application of the Pythagorean Theorem'");
 42 }
 43</script>
 44<script src="../../resources/js-test-post.js"></script>
 45</body>
 46</html>

LayoutTests/accessibility/mac/aria-details-expected.txt

 1
 2The Pythagorean Theorem is a relationship in Euclidean Geometry between the three sides of a right triangle, where the square of the hypotenuse is the sum of the squares of the two opposing sides.
 3
 4The following drawing illustrates an application of the Pythagorean Theorem when used to construct a skateboard ramp.
 5
 6In this example you will notice a skateboard ramp with a base and vertical board whose width is the width of the ramp. To compute how long the ramp must be, simply calculate the base length, square it, sum it with the square of the height of the ramp, and take the square root of the sum.
 7
 8See an Application of the Pythagorean Theorem.
 9
 10This verifies the exposure of aria-details.
 11
 12On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 13
 14
 15PASS details.length is 2
 16PASS details[0].domIdentifier is 'details1'
 17PASS details[1].domIdentifier is 'details2'
 18PASS successfullyParsed is true
 19
 20TEST COMPLETE
 21

LayoutTests/accessibility/mac/aria-details.html

 1<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 2<html>
 3<head>
 4<script src="../../resources/js-test-pre.js"></script>
 5</head>
 6<body>
 7
 8<img id="image1" src="pythagorean.jpg" alt="Pythagorean Theorem" aria-details="details1 details2">
 9<details open id="details1">
 10 <p>
 11 The Pythagorean Theorem is a relationship in Euclidean Geometry between the three sides of
 12 a right triangle, where the square of the hypotenuse is the sum of the squares of the two
 13 opposing sides.
 14 </p>
 15 <p>
 16 The following drawing illustrates an application of the Pythagorean Theorem when used to
 17 construct a skateboard ramp.
 18 </p>
 19 <p>
 20 In this example you will notice a skateboard ramp with a base and vertical board whose width
 21 is the width of the ramp. To compute how long the ramp must be, simply calculate the
 22 base length, square it, sum it with the square of the height of the ramp, and take the
 23 square root of the sum.
 24 </p>
 25</details>
 26<p>See an <a href="http://foo.com/pt.html" id="details2">Application of the Pythagorean Theorem</a>.</p>
 27
 28<p id="description"></p>
 29<div id="console"></div>
 30
 31<script>
 32 description("This verifies the exposure of aria-details.");
 33
 34 if (window.accessibilityController) {
 35 image1 = accessibilityController.accessibleElementById("image1");
 36 details = image1.detailsElements();
 37 shouldBe("details.length", "2");
 38 shouldBe("details[0].domIdentifier", "'details1'");
 39 shouldBe("details[1].domIdentifier", "'details2'");
 40 }
 41</script>
 42<script src="../../resources/js-test-post.js"></script>
 43</body>
 44</html>

LayoutTests/platform/mac-wk1/TestExpectations

@@accessibility/aria-current-state-changed-notification.html [ Skip ]
958958accessibility/aria-current.html [ Skip ]
959959accessibility/aria-sort-changed-notification.html [ Skip ]
960960accessibility/aria-sort.html [ Skip ]
 961accessibility/mac/aria-details.html [ Skip ]
961962accessibility/mac/aria-errormessage.html [ Skip ]
962963
963964# <rdar://problem/61066929> [ Stress GC ] flaky JSC::ExceptionScope::assertNoException crash under WebCore::ReadableStreamDefaultController

@@webkit.org/b/223283 fast/repaint/canvas-object-fit.html [ Pass Failure ]
12561257
12571258webkit.org/b/222563 http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html [ Pass Failure ]
12581259
1259 webkit.org/b/222686 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-max-size-001.html [ Pass Failure ]
12601260\ No newline at end of file
 1261webkit.org/b/222686 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-max-size-001.html [ Pass Failure ]