|
24 | 24 | // Element reference should be set if the content attribute was included.
|
25 | 25 | assert_equals(parentListbox.getAttribute("aria-activedescendant"), "i1", "check content attribute after parsing.");
|
26 | 26 | assert_equals(parentListbox.ariaActiveDescendantElement, i1, "check idl attribute after parsing.");
|
| 27 | + assert_equals(parentListbox.ariaActiveDescendantElement, parentListbox.ariaActiveDescendantElement, "check idl attribute caching after parsing."); |
27 | 28 |
|
28 | 29 | // If we set the content attribute, the element reference should reflect this.
|
29 | 30 | parentListbox.setAttribute("aria-activedescendant", "i2");
|
30 | 31 | assert_equals(parentListbox.ariaActiveDescendantElement, i2, "setting the content attribute updates the element reference.");
|
| 32 | + assert_equals(parentListbox.ariaActiveDescendantElement, parentListbox.ariaActiveDescendantElement, "check idl attribute caching after update."); |
31 | 33 |
|
32 | 34 | // Setting the element reference should be reflected in the content attribute.
|
33 | 35 | parentListbox.ariaActiveDescendantElement = i1;
|
|
342 | 344 | test(function(t) {
|
343 | 345 | const billingElement = document.getElementById("billingElement")
|
344 | 346 | assert_array_equals(input1.ariaLabelledByElements, [billingElement, nameElement], "parsed content attribute sets element references.");
|
| 347 | + assert_equals(input1.ariaLabelledByElements, input1.ariaLabelledByElements, "check idl attribute caching after parsing"); |
345 | 348 | assert_equals(input2.ariaLabelledByElements, null, "Testing missing content attribute after parsing.");
|
346 | 349 |
|
347 | 350 | input2.ariaLabelledByElements = [billingElement, addressElement];
|
348 | 351 | assert_array_equals(input2.ariaLabelledByElements, [billingElement, addressElement], "Testing IDL setter/getter.");
|
| 352 | + assert_equals(input1.ariaLabelledByElements, input1.ariaLabelledByElements, "check idl attribute caching after update"); |
349 | 353 | assert_equals(input2.getAttribute("aria-labelledby"), "billingElement addressElement");
|
350 | 354 |
|
351 | 355 | // Remove the billingElement from the DOM.
|
|
0 commit comments