Commit e68681df authored by k.czech@samsung.com's avatar k.czech@samsung.com

Default orientation for aria scrollbars should be vertical

Default orientation for aria scrollbars regarding http://www.w3.org/TR/wai-aria-1.1/#aria-orientation
and http://www.w3.org/TR/wai-aria-implementation/ should be vertical.

It's based on WebKit changeset http://trac.webkit.org/changeset/174217

BUG=

Review URL: https://codereview.chromium.org/723123002

git-svn-id: svn://svn.chromium.org/blink/trunk@185459 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 7297353e
scrollbar
scrollbar
This tests that the ARIA scrollbar role works correctly
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
......@@ -8,6 +9,9 @@ PASS scroller.role is 'AXRole: AXScrollBar'
PASS scroller.intValue is 55
PASS scroller.orientation is 'AXOrientation: AXVerticalOrientation'
PASS scroller.orientation is 'AXOrientation: AXHorizontalOrientation'
PASS scroller.role is 'AXRole: AXScrollBar'
PASS scroller.intValue is 55
PASS scroller.orientation is 'AXOrientation: AXVerticalOrientation'
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -5,8 +5,8 @@
</head>
<body id="body">
<div tabindex=0 id="scroller" aria-valuenow="55" role="scrollbar" aria-orientation="vertical">scrollbar</div>
<div tabindex=0 id="scroller1" aria-valuenow="55" role="scrollbar" aria-orientation="vertical">scrollbar</div>
<div tabindex=0 id="scroller2" aria-valuenow="55" role="scrollbar">scrollbar</div>
<p id="description"></p>
<div id="console"></div>
......@@ -17,14 +17,22 @@
if (window.accessibilityController) {
document.getElementById("scroller").focus();
document.getElementById("scroller1").focus();
var scroller = accessibilityController.focusedElement;
shouldBe("scroller.role", "'AXRole: AXScrollBar'");
shouldBe("scroller.intValue", "55");
shouldBe("scroller.orientation", "'AXOrientation: AXVerticalOrientation'");
document.getElementById("scroller").setAttribute("aria-orientation", "horizontal");
document.getElementById("scroller1").setAttribute("aria-orientation", "horizontal");
shouldBe("scroller.orientation", "'AXOrientation: AXHorizontalOrientation'");
// Default orientation should be vertical for scrollbars
document.getElementById("scroller2").focus();
scroller = accessibilityController.focusedElement;
shouldBe("scroller.role", "'AXRole: AXScrollBar'");
shouldBe("scroller.intValue", "55");
shouldBe("scroller.orientation", "'AXOrientation: AXVerticalOrientation'");
}
</script>
......
......@@ -855,6 +855,9 @@ AccessibilityOrientation AXRenderObject::orientation() const
if (equalIgnoringCase(ariaOrientation, "vertical"))
return AccessibilityOrientationVertical;
if (isScrollbar())
return AccessibilityOrientationVertical;
return AXObject::orientation();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment