Commit 8991df59 authored by Aaron Leventhal's avatar Aaron Leventhal Committed by Commit Bot

Support ariaDescription DOM property

The aria-description property is now in the master branch of the
draft ARIA spec.

Bug: 1006767
Change-Id: Ic23904c8d8de32aa0f7ff3c4c03ec8a9a26c6b48
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1999301Reviewed-by: default avatarMike West <mkwst@chromium.org>
Reviewed-by: default avatarMason Freed <masonfreed@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#743093}
parent 93952108
......@@ -16,6 +16,7 @@
[CEReactions, Reflect=aria_colindex] attribute DOMString? ariaColIndex;
[CEReactions, Reflect=aria_colspan] attribute DOMString? ariaColSpan;
[CEReactions, Reflect=aria_current] attribute DOMString? ariaCurrent;
[RuntimeEnabled=AccessibilityExposeARIAAnnotations, CEReactions, Reflect=aria_description] attribute DOMString? ariaDescription;
[CEReactions, Reflect=aria_disabled] attribute DOMString? ariaDisabled;
[CEReactions, Reflect=aria_expanded] attribute DOMString? ariaExpanded;
[CEReactions, Reflect=aria_haspopup] attribute DOMString? ariaHasPopup;
......
......@@ -116,7 +116,6 @@
},
{
name: "AccessibilityExposeARIAAnnotations",
origin_trial_feature_name: "AccessibilityExposeARIAAnnotations",
status: "experimental",
},
{
......
......@@ -177,5 +177,15 @@ test(function() {
}, "aria-posinset");
test(function() {
const element = createTestElement("ariaDescription");
element.role = 'button';
const axElement = axElementById(element.id);
element.internals.ariaDescription = 'better than apple pie';
assert_equals(axElement.description, 'better than apple pie',
"ariaDescription can be set through ElementInternals");
element.remove();
}, "aria-description");
</script>
</body>
......@@ -109,6 +109,17 @@ test(function(t) {
<div id="disabled" aria-disabled="true"></div>
<div id="description" aria-description="cold as ice"></div>
<script>
test(function(t) {
var element = document.getElementById("description");
assert_equals(element.ariaDescription, "cold as ice");
element.ariaDescription = "hot as fire";
assert_equals(element.getAttribute("aria-description"), "hot as fire");
}, "aria-description attribute reflects.");
</script>
<script>
test(function(t) {
var element = document.getElementById("disabled");
......
......@@ -41,6 +41,7 @@ namespace http://www.w3.org/1999/xhtml
property ariaControlsElements
property ariaCurrent
property ariaDescribedByElements
property ariaDescription
property ariaDetailsElements
property ariaDisabled
property ariaErrorMessageElement
......@@ -1250,6 +1251,7 @@ namespace http://www.w3.org/2000/svg
property ariaControlsElements
property ariaCurrent
property ariaDescribedByElements
property ariaDescription
property ariaDetailsElements
property ariaDisabled
property ariaErrorMessageElement
......
......@@ -1993,6 +1993,7 @@ interface Element : Node
getter ariaControlsElements
getter ariaCurrent
getter ariaDescribedByElements
getter ariaDescription
getter ariaDetailsElements
getter ariaDisabled
getter ariaErrorMessageElement
......@@ -2137,6 +2138,7 @@ interface Element : Node
setter ariaControlsElements
setter ariaCurrent
setter ariaDescribedByElements
setter ariaDescription
setter ariaDetailsElements
setter ariaDisabled
setter ariaErrorMessageElement
......@@ -2205,6 +2207,7 @@ interface ElementInternals
getter ariaControlsElements
getter ariaCurrent
getter ariaDescribedByElements
getter ariaDescription
getter ariaDetailsElements
getter ariaDisabled
getter ariaErrorMessageElement
......@@ -2261,6 +2264,7 @@ interface ElementInternals
setter ariaControlsElements
setter ariaCurrent
setter ariaDescribedByElements
setter ariaDescription
setter ariaDetailsElements
setter ariaDisabled
setter ariaErrorMessageElement
......
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