Both auto* and delegates* attributes map to individual properties on the elements. I understand this is traditional and may just be something we don't want to push to change. However, the data-* attributes work in a very cool way that could be useful here if we want to clean up the API a bit. This would entail adding a dash in between the property key and the sub-property being targeted. Then the properties could all exist within one namespaced property on the element.
For example delegatesariaatomic would become delegates-ariaatomic and then map to a delegates property like so Element.delegates.ariaAtomic. Rinse and repeat.
Once again, unsure if this is something even considerable given how the data-* API is the only one to work this way and it was specifically designed to do this consolidation/namespacing. However, if we could get it that would be helpful in a few ways:
Keep auto-complete helpers less cluttered in the global space for an element
Iterating over just what a developer needs to go over, if a reason comes up, is more targeted
It could help spot typos more easily since there is a separator making two shorter things to parse individually
Both
auto*
anddelegates*
attributes map to individual properties on the elements. I understand this is traditional and may just be something we don't want to push to change. However, thedata-*
attributes work in a very cool way that could be useful here if we want to clean up the API a bit. This would entail adding a dash in between the property key and the sub-property being targeted. Then the properties could all exist within one namespaced property on the element.For example
delegatesariaatomic
would becomedelegates-ariaatomic
and then map to adelegates
property like soElement.delegates.ariaAtomic
. Rinse and repeat.Once again, unsure if this is something even considerable given how the
data-*
API is the only one to work this way and it was specifically designed to do this consolidation/namespacing. However, if we could get it that would be helpful in a few ways: