test: support with-aria-* attributes on testutils-element - #5137
Conversation
There was a problem hiding this comment.
Looks good — clean implementation that mirrors the existing with-role pattern, and reading the attributes in the constructor works fine for the innerHTML/queryFixture usage since the element upgrades after its attributes are appended. Nice prep for #5044.
One thing worth keeping in mind for later (not blocking): the singular-vs-array branch keys off type, so it covers the attributes #5044 needs but not aria-details/aria-errormessage, which are type: 'idref' in the standards data yet reflect to the plural *Elements array props. If those come into scope, deriving arity from the prop suffix (Elements → array) would handle them uniformly.
This is what Claude kept reporting during my review. I feel like we have had discussions about this on and off the last several days. Will defer to you on what, if anything, we should change about it.
|
aria-details/aria-errormessage being |
…5137) In preparation for dequelabs#5044, this will allow us to declaratively set aria prop values on the `testutils-element` using `with-aria-*` attributes (mimicking the `with-role` attribute). It handles converting idref(s) attributes to their DOM nodes.
In preparation for #5044, this will allow us to declaratively set aria prop values on the
testutils-elementusingwith-aria-*attributes (mimicking thewith-roleattribute). It handles converting idref(s) attributes to their DOM nodes.