Skip to content

Commit

Permalink
'Item' nodes cannot have PDOM content, see #771
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Jun 28, 2022
1 parent ee394ab commit e3e8701
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/VerticalCheckboxGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ export default class VerticalCheckboxGroup extends VBox {

const item = items[ i ];

assert && assert( !item.node.hasPDOMContent,
'Accessibility is provided by Checkbox and VerticalCheckboxGroupItem.options. ' +
'Additional PDOM content in the provided Node could break accessibility.' );

// Content for the checkbox. Add an invisible strut, so that checkboxes have uniform width.
const content = new Node( {
children: [ new HStrut( maxItemWidth ), item.node ]
Expand Down

0 comments on commit e3e8701

Please sign in to comment.