diff --git a/js/Checkbox.js b/js/Checkbox.js index 35fdb952..bd340d87 100644 --- a/js/Checkbox.js +++ b/js/Checkbox.js @@ -49,6 +49,7 @@ define( function( require ) { phetioEventType: 'user', phetioReadOnly: PhetioObject.DEFAULT_OPTIONS.phetioReadOnly, // to support properly passing this to children, see https://github.com/phetsims/tandem/issues/60 phetioDocumentation: '', // different default than PhetioObject, see implementation below + phetioControlledProperty: property, // a11y tagName: 'input', @@ -90,13 +91,6 @@ define( function( require ) { phetioDocumentation: 'When disabled, the checkbox is grayed out and cannot be pressed.' } ); - // (phet-io) document the instrumented Property that this Checkbox manipulates - options.phetioDocumentation += - ' This checkbox controls the PropertyIO.<BooleanIO>: ' + - '' + property.tandem.phetioID + ''; - options.phetioDocumentation = options.phetioDocumentation.trim(); // eliminate preceding whitespace, if any. - - // @private - sends out notifications when the checkbox is toggled. var toggledEmitter = new Emitter( { tandem: options.tandem.createTandem( 'toggledEmitter' ), @@ -181,10 +175,6 @@ define( function( require ) { // assert that phet-io is set up correctly after the PhetioObject has been properly initialized (after mutate) - // If either one is instrumented, then the other must be too. - assert && Tandem.validationEnabled() && assert( this.isPhetioInstrumented() === property.isPhetioInstrumented(), - 'Property must be instrumented if controlling Checkbox is.' ); - // If either one is instrumented, then the other must be too. assert && Tandem.validationEnabled() && assert( this.enabledProperty.isPhetioInstrumented() === this.isPhetioInstrumented(), 'provided enabled property must be instrumented for phet-io.' ); diff --git a/js/ComboBox.js b/js/ComboBox.js index 24697dac..8bd8ea7b 100644 --- a/js/ComboBox.js +++ b/js/ComboBox.js @@ -74,6 +74,8 @@ define( require => { tandem: Tandem.required, phetioType: ComboBoxIO, phetioEventType: 'user', + phetioDocumentation: '', // different default than PhetioObject, see implementation below + phetioControlledProperty: property, // a11y a11yButtonLabel: '' // {string} accessible label for the button that opens this combobox @@ -273,7 +275,7 @@ define( require => { this.buttonNode = new ButtonNode( new ComboBoxItemNode( items[ 0 ], itemWidth, itemHeight, options.itemXMargin ), options ); this.addChild( this.buttonNode ); - // a11y - the list is labelledby the button's label + // a11y - the list is labeled by the button's label this.listNode.addAriaLabelledbyAssociation( { otherNode: this.buttonNode, otherElementName: AccessiblePeer.LABEL_SIBLING,