Commit 7e8eec59 authored by Dominic Mazzoni's avatar Dominic Mazzoni Committed by Commit Bot

Fix ARIA reflection of aria-pressed and aria-readonly.

They were accidentally mixed up in both the IDL and the tests.
(I used a macro to generate the tests from the IDL, so the same
bug crept into both.)

Bug: 844540
Change-Id: I04023b609402e2b795a69a785c7f04af3c9459f7
Reviewed-on: https://chromium-review.googlesource.com/1103447Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567955}
parent c8c3d8e8
...@@ -310,13 +310,24 @@ test(function(t) { ...@@ -310,13 +310,24 @@ test(function(t) {
}, "aria-posinset attribute reflects."); }, "aria-posinset attribute reflects.");
</script> </script>
<div id="readonly" aria-readonly="true"></div> <button id="pressed" aria-pressed="true"></button>
<script> <script>
test(function(t) { test(function(t) {
var element = document.getElementById("readonly"); var element = document.getElementById("pressed");
assert_equals(element.ariaPressed, "true"); assert_equals(element.ariaPressed, "true");
element.ariaPressed = "false"; element.ariaPressed = "false";
assert_equals(element.getAttribute("aria-pressed"), "false");
}, "aria-pressed attribute reflects.");
</script>
<div id="readonly" aria-readonly="true"></div>
<script>
test(function(t) {
var element = document.getElementById("readonly");
assert_equals(element.ariaReadOnly, "true");
element.ariaReadOnly = "false";
assert_equals(element.getAttribute("aria-readonly"), "false"); assert_equals(element.getAttribute("aria-readonly"), "false");
}, "aria-readonly attribute reflects."); }, "aria-readonly attribute reflects.");
</script> </script>
......
...@@ -59,6 +59,7 @@ namespace http://www.w3.org/1999/xhtml ...@@ -59,6 +59,7 @@ namespace http://www.w3.org/1999/xhtml
property ariaPlaceholder property ariaPlaceholder
property ariaPosInSet property ariaPosInSet
property ariaPressed property ariaPressed
property ariaReadOnly
property ariaRelevant property ariaRelevant
property ariaRequired property ariaRequired
property ariaRoleDescription property ariaRoleDescription
...@@ -1219,6 +1220,7 @@ namespace http://www.w3.org/2000/svg ...@@ -1219,6 +1220,7 @@ namespace http://www.w3.org/2000/svg
property ariaPlaceholder property ariaPlaceholder
property ariaPosInSet property ariaPosInSet
property ariaPressed property ariaPressed
property ariaReadOnly
property ariaRelevant property ariaRelevant
property ariaRequired property ariaRequired
property ariaRoleDescription property ariaRoleDescription
......
...@@ -1859,6 +1859,7 @@ interface Element : Node ...@@ -1859,6 +1859,7 @@ interface Element : Node
getter ariaPlaceholder getter ariaPlaceholder
getter ariaPosInSet getter ariaPosInSet
getter ariaPressed getter ariaPressed
getter ariaReadOnly
getter ariaRelevant getter ariaRelevant
getter ariaRequired getter ariaRequired
getter ariaRoleDescription getter ariaRoleDescription
...@@ -1995,6 +1996,7 @@ interface Element : Node ...@@ -1995,6 +1996,7 @@ interface Element : Node
setter ariaPlaceholder setter ariaPlaceholder
setter ariaPosInSet setter ariaPosInSet
setter ariaPressed setter ariaPressed
setter ariaReadOnly
setter ariaRelevant setter ariaRelevant
setter ariaRequired setter ariaRequired
setter ariaRoleDescription setter ariaRoleDescription
......
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
[CEReactions, Reflect=aria_owns] attribute DOMString? ariaOwns; [CEReactions, Reflect=aria_owns] attribute DOMString? ariaOwns;
[CEReactions, Reflect=aria_placeholder] attribute DOMString? ariaPlaceholder; [CEReactions, Reflect=aria_placeholder] attribute DOMString? ariaPlaceholder;
[CEReactions, Reflect=aria_posinset] attribute DOMString? ariaPosInSet; [CEReactions, Reflect=aria_posinset] attribute DOMString? ariaPosInSet;
[CEReactions, Reflect=aria_readonly] attribute DOMString? ariaPressed; [CEReactions, Reflect=aria_pressed] attribute DOMString? ariaPressed;
[CEReactions, Reflect=aria_readonly] attribute DOMString? ariaReadOnly;
[CEReactions, Reflect=aria_relevant] attribute DOMString? ariaRelevant; [CEReactions, Reflect=aria_relevant] attribute DOMString? ariaRelevant;
[CEReactions, Reflect=aria_required] attribute DOMString? ariaRequired; [CEReactions, Reflect=aria_required] attribute DOMString? ariaRequired;
[CEReactions, Reflect=aria_roledescription] attribute DOMString? ariaRoleDescription; [CEReactions, Reflect=aria_roledescription] attribute DOMString? ariaRoleDescription;
......
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