phetsims / sun

User-interface components for PhET simulations, built on top of Scenery.
MIT License
4 stars 12 forks source link

Why is labelNode in ComboBox? #823

Closed jonathanolson closed 1 year ago

jonathanolson commented 1 year ago

This causes a lot of layout headaches and complication, including https://github.com/phetsims/energy-skate-park/issues/366.

It seems simpler from a layout standpoint to remove labelNode, and just include it in an HBox or other container and keep it next to the component.

Is this done for an a11y reason? I don't see a similar pattern in Slider, instead accessibleName is used, and the label Node doesn't seem explicitly linked (e.g. VerticalSlider in molarity).

jessegreenberg commented 1 year ago

We discussed over a zoom call that labelNode is a feature of ComboBox that is unrelated to a11y features. It is just a graphical label Node. Moving it should have no impact on PDOM structure.

jonathanolson commented 1 year ago

Implemented, closing!