Skip to content

Commit

Permalink
responses for Checkbox can take an Alertabledef and rename accordingl…
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Jan 26, 2022
1 parent a7fb2d9 commit 6afc6a9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions js/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ class Checkbox extends Voicing( Node ) {
inputType: 'checkbox',
appendDescription: true,

// {Utterance|null} - Utterances to be spoken with a screen reader after the checkbox is pressed.
checkedContextResponseUtterance: null,
uncheckedContextResponseUtterance: null
// {AlertableDef|null} - Utterances to be spoken with a screen reader after the checkbox is pressed.
checkedContextResponse: null,
uncheckedContextResponse: null
}, options );

super();
Expand All @@ -97,11 +97,11 @@ class Checkbox extends Voicing( Node ) {
validate( property.value, BOOLEAN_VALIDATOR );
if ( property.value ) {
options.checkedSoundPlayer.play();
options.checkedContextResponseUtterance && this.alertDescriptionUtterance( options.checkedContextResponseUtterance );
options.checkedContextResponse && this.alertDescriptionUtterance( options.checkedContextResponse );
}
else {
options.uncheckedSoundPlayer.play();
options.uncheckedContextResponseUtterance && this.alertDescriptionUtterance( options.uncheckedContextResponseUtterance );
options.uncheckedContextResponse && this.alertDescriptionUtterance( options.uncheckedContextResponse );
}
}, {
parameters: [],
Expand Down

1 comment on commit 6afc6a9

@jessegreenberg
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.