Title: [271166] trunk
Revision
271166
Author
[email protected]
Date
2021-01-05 12:00:37 -0800 (Tue, 05 Jan 2021)

Log Message

AX: aria-orientation is ignored on input[type="range"]
https://bugs.webkit.org/show_bug.cgi?id=220222
<rdar://problem/72765547>

Reviewed by Zalan Bujtas.

Source/WebCore:

Check aria-orientation on range sliders.

Test: accessibility/mac/range-orientation.html

* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySlider::orientation const):

LayoutTests:

* accessibility/mac/range-orientation.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (271165 => 271166)


--- trunk/LayoutTests/ChangeLog	2021-01-05 20:00:11 UTC (rev 271165)
+++ trunk/LayoutTests/ChangeLog	2021-01-05 20:00:37 UTC (rev 271166)
@@ -1,3 +1,13 @@
+2021-01-05  Chris Fleizach  <[email protected]>
+
+        AX: aria-orientation is ignored on input[type="range"]
+        https://bugs.webkit.org/show_bug.cgi?id=220222
+        <rdar://problem/72765547>
+
+        Reviewed by Zalan Bujtas.
+
+        * accessibility/mac/range-orientation.html: Added.
+
 2021-01-05  Truitt Savell  <[email protected]>
 
         [ Big Sur ] fast/images/webp-as-image.html is failing

Added: trunk/LayoutTests/accessibility/mac/range-orientation-expected.txt (0 => 271166)


--- trunk/LayoutTests/accessibility/mac/range-orientation-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/accessibility/mac/range-orientation-expected.txt	2021-01-05 20:00:37 UTC (rev 271166)
@@ -0,0 +1,13 @@
+
+Validate orientation on range types.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS range1.orientation is 'AXOrientation: AXVerticalOrientation'
+PASS range2.orientation is 'AXOrientation: AXHorizontalOrientation'
+PASS range3.orientation is 'AXOrientation: AXHorizontalOrientation'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/accessibility/mac/range-orientation.html (0 => 271166)


--- trunk/LayoutTests/accessibility/mac/range-orientation.html	                        (rev 0)
+++ trunk/LayoutTests/accessibility/mac/range-orientation.html	2021-01-05 20:00:37 UTC (rev 271166)
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body id="body">
+
+<input id="range1" type="range" aria-orientation="vertical" />
+<input id="range2" type="range" aria-orientation="horizontal" />
+<input id="range3" type="range"/>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+    description("Validate orientation on range types.");
+
+    if (window.accessibilityController) {
+        var range1 = accessibilityController.accessibleElementById("range1");
+        shouldBe("range1.orientation", "'AXOrientation: AXVerticalOrientation'");
+
+        var range2 = accessibilityController.accessibleElementById("range2");
+        shouldBe("range2.orientation", "'AXOrientation: AXHorizontalOrientation'");
+
+        var range3 = accessibilityController.accessibleElementById("range3");
+        shouldBe("range3.orientation", "'AXOrientation: AXHorizontalOrientation'");
+    }
+</script>
+<script src=""
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (271165 => 271166)


--- trunk/Source/WebCore/ChangeLog	2021-01-05 20:00:11 UTC (rev 271165)
+++ trunk/Source/WebCore/ChangeLog	2021-01-05 20:00:37 UTC (rev 271166)
@@ -1,3 +1,18 @@
+2021-01-05  Chris Fleizach  <[email protected]>
+
+        AX: aria-orientation is ignored on input[type="range"]
+        https://bugs.webkit.org/show_bug.cgi?id=220222
+        <rdar://problem/72765547>
+
+        Reviewed by Zalan Bujtas.
+
+        Check aria-orientation on range sliders.
+
+        Test: accessibility/mac/range-orientation.html
+
+        * accessibility/AccessibilitySlider.cpp:
+        (WebCore::AccessibilitySlider::orientation const):
+
 2021-01-05  Alicia Boya GarcĂ­a  <[email protected]>
 
         [GStreamer] Use Ref<> in AudioTrackPrivateGStreamer::create()

Modified: trunk/Source/WebCore/accessibility/AccessibilitySlider.cpp (271165 => 271166)


--- trunk/Source/WebCore/accessibility/AccessibilitySlider.cpp	2021-01-05 20:00:11 UTC (rev 271165)
+++ trunk/Source/WebCore/accessibility/AccessibilitySlider.cpp	2021-01-05 20:00:37 UTC (rev 271166)
@@ -56,6 +56,14 @@
     if (!m_renderer)
         return AccessibilityOrientation::Horizontal;
     
+    auto ariaOrientation = getAttribute(aria_orientationAttr);
+    if (equalLettersIgnoringASCIICase(ariaOrientation, "horizontal"))
+        return AccessibilityOrientation::Horizontal;
+    if (equalLettersIgnoringASCIICase(ariaOrientation, "vertical"))
+        return AccessibilityOrientation::Vertical;
+    if (equalLettersIgnoringASCIICase(ariaOrientation, "undefined"))
+        return AccessibilityOrientation::Undefined;
+    
     const RenderStyle& style = m_renderer->style();
 
     ControlPart styleAppearance = style.appearance();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to