Closed pixelzoom closed 2 years ago
Assertions added, they caught one case of improper markup in greenhouse-effect where a slider was nested under a radio button. Im surprised that didn't mess with the traversal order or screen reader experience, but good to prevent.
@zepumph are you OK with this change?
Awesome! Thanks
Reopening.
I like the new assertion:
assert && assert( !item.node.hasPDOMContent,
'Accessibility is provided by Checkbox and VerticalCheckboxGroupItem.options. ' +
'Additional PDOM content in the provided Node could break accessibility.' );
Much clearer than what formerly appeared in ComboBoxItem and was moved to ComboBox:
assert && assert( !item.node.hasPDOMContent, 'pdomContent is set by ComboBox, use options.a11yLabel' );
Can we use the same (new) assertion in ComboBox?
Also reopening because this is apparently causing a sim problem. In Slack#developer, @AgustinVallejo asked:
Hey everyone! Any idea on why this assertion might have popped up after a pull (and how to fix it)? It was working yesterday 'Accessibility is provided by RectangularRadioButton and RectangularRadioButtonItem.labelContent. ' + 'Additional PDOM content in the provided Node could break accessibility.'
Yes, I improved the assertion message in ComboBox. The report in https://github.com/phetsims/sun/issues/771#issuecomment-1170198314 is the assertion working as hoped and is the case we are trying to prevent. Sorry I didn't catch it first with local testing.
👍🏻
In https://github.com/phetsims/sun/issues/768#issuecomment-1165114123, I identified this assertion in ComboBoxItem, which was subsequently relocated to ComboBox:
In https://github.com/phetsims/sun/issues/768#issuecomment-1165800339, @zepumph said:
So assertions related to "items" should likely be added to the follow: