phetsims / scenery

Scenery is an HTML5 scene graph.
http://scenerystack.org/
MIT License
55 stars 12 forks source link

Better implementation for association attributes #952

Open zepumph opened 5 years ago

zepumph commented 5 years ago

Related to https://github.com/phetsims/scenery/issues/873, I noticed while working on that that every association attribute (like aria-labelledby and aria-describedby) take about 150 lines. Most of that is very similar between different attributes, but not easy to refactor in its current form. We should investigate a way to simplify the 450 lines (for three of these attributes) in the middle of Accessilbility.js

zepumph commented 5 years ago

Specifically perhaps see, https://github.com/phetsims/scenery/issues/873#issuecomment-435170767 for more info.

zepumph commented 5 years ago

We should be able to support attributes that one a single value, as well as a list seamlessly.