servo / servo

Servo, the embeddable, independent, memory-safe, modular, parallel web rendering engine

Home Page:https://servo.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement `ARIAMixin` on `Element`

nolanlawson opened this issue · comments

I noticed that ElementInternals support was added recently (#31980). I think it would be nice to implement basic ARIAMixin reflection for Elements as well:

element.setAttribute('aria-label', 'foo')
element.ariaLabel // 'foo'

The trickiest part is that this is a mixin, so ideally it would be implemented on both Element as well as ElementInternals. (See relevant spec and WPT tests.) Although maybe for a first pass, it can just be defined directly on Element?

I was looking into this a bit, and it seems that html5ever might also need to be updated to include the necessary local names (e.g. ariaLabel, which is missing from local_names.txt).