Skip to content

Commit

Permalink
Replace ARIA reflection attribute ariaErrorMessageElement with ariaEr…
Browse files Browse the repository at this point in the history
…rorMessageElements

This is WPT updates for w3c/aria#1802
  • Loading branch information
rniwa committed Jan 11, 2023
1 parent 8ff38c5 commit 2948659
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion custom-elements/ElementInternals-accessibility.html
Expand Up @@ -38,7 +38,7 @@
"ariaDescribedByElements",
"ariaDetailsElements",
"ariaDisabled",
"ariaErrorMessageElement",
"ariaErrorMessageElements",
"ariaExpanded",
"ariaFlowToElements",
"ariaHasPopup",
Expand Down Expand Up @@ -76,4 +76,5 @@
assert_inherits(element.internals, property);
}, property + " is defined in ElementInternals");
}
test(() => assert_false(!!element.internals.ariaErrorMessageElement), 'ariaErrorMessageElement is not defined in ElementInternals')
</script>
Expand Up @@ -55,7 +55,7 @@
testElementReflectAttribute('ariaControlsElements', 'aria-controls', [dummy1], [dummy2], 'ariaControlsElements in Element');
testElementReflectAttribute('ariaDescribedByElements', 'aria-describedby', [dummy1], [dummy2], 'ariaDescribedByElements in Element');
testElementReflectAttribute('ariaDetailsElements', 'aria-details', [dummy1], [dummy2], 'ariaDetailsElements in Element');
testElementReflectAttribute('ariaErrorMessageElement', 'aria-errormessage', dummy1, dummy2, 'ariaErrorMessageElement in Element');
testElementReflectAttribute('ariaErrorMessageElements', 'aria-errormessage', [dummy1], [dummy2], 'ariaErrorMessageElements in Element');
testElementReflectAttribute('ariaFlowToElements', 'aria-flowto', [dummy1], [dummy2], 'ariaFlowToElements in Element');
testElementReflectAttribute('ariaLabelledByElements', 'aria-labelledby', [dummy1], [dummy2], 'ariaLabelledByElements in Element')
testElementReflectAttribute('ariaOwnsElements', 'aria-owns', [dummy1], [dummy2], 'ariaOwnsElements in Element')
Expand Down
12 changes: 6 additions & 6 deletions html/dom/aria-element-reflection.html
Expand Up @@ -122,16 +122,16 @@

<script>
test(function(t) {
startTime.ariaErrorMessageElement = errorMessage;
startTime.ariaErrorMessageElements = [errorMessage];
assert_equals(startTime.getAttribute("aria-errormessage"), "");
assert_equals(startTime.ariaErrorMessageElement, errorMessage);
assert_array_equals(startTime.ariaErrorMessageElements, [errorMessage]);

startTime.ariaErrorMessageElement = null;
assert_equals(startTime.ariaErrorMessageElement, null, "blah");
assert_false(startTime.hasAttribute("aria-errormessage"));
startTime.ariaErrorMessageElements = [];
assert_array_equals(startTime.ariaErrorMessageElements, []);
assert_equals(startTime.getAttribute("aria-errormessage"), "");

startTime.setAttribute("aria-errormessage", "errorMessage");
assert_equals(startTime.ariaErrorMessageElement, errorMessage);
assert_array_equals(startTime.ariaErrorMessageElements, [errorMessage]);

}, "aria-errormessage");

Expand Down

0 comments on commit 2948659

Please sign in to comment.