aom
aom copied to clipboard
AccessibleNodeList API feedback
In general a lot of this feedback is about not using the same name as DOM APIs but with different semantics or parameters. This feedback is cross-cutting with #25.
getNodeis useless. Just have an unnamed indexed getter.- Do not overload
remove(). - Consider following the Array API more closely. If you use [LegacyArrayClass] you'll get a bunch of methods for free, using names that JS developers are more used to (e.g. push instead of append, splice instead of insertBefore/remove/replace).
I'm possibly open to the idea but worried web developers will find it odd given the closer similarity to preexisting DOM methods (insertBefore, etc.) Feels unrealistic to say authors would expect node insertions to be achieved using splice().
The API is already in a much worse uncanny valley in that regard. It uses familiar DOM names with different arguments, orderings, return values, and in some cases semantics.