diff --git a/js/molarity/MolarityA11yStrings.js b/js/molarity/MolarityA11yStrings.js index abb917cf..b9813d20 100644 --- a/js/molarity/MolarityA11yStrings.js +++ b/js/molarity/MolarityA11yStrings.js @@ -340,10 +340,10 @@ define( require => { value: '{{color}} solution, {{concentrationClause}}.' }, soluteChangedSaturatedAlertPattern: { - value: '{{color}} solution, saturated with {{solids}} solids, {{concentrationClause}}.' + value: '{{color}} solution, saturated with {{solids}} solids{{concentrationClause}}.' }, - soluteChangedQualitativePattern: { - value: 'beyond max concentration' + soluteChangedQuantitativeConcentrationPattern: { + value: ', concentration {{concentration}}' }, noSoluteAlertQuantitative: { value: 'Clear solution, pure water at zero moles.' @@ -362,9 +362,12 @@ define( require => { saturationReachedAlert: { value: 'Saturated with {{solidAmount}} solids at {{concentration}}.' }, - saturationLostAlertPattern: { + saturationLostQualitativeAlertPattern: { value: 'No longer saturated. Solution lighter, {{concentration}}.' }, + saturationLostQuantitativeAlertPattern: { + value: 'No longer saturated at {{concentration}}. Solution lighter.' + }, // Saturated solution alert strings stillSaturatedAlertPattern: { diff --git a/js/molarity/view/describers/ConcentrationDescriber.js b/js/molarity/view/describers/ConcentrationDescriber.js index 69032c8e..7cc0106a 100644 --- a/js/molarity/view/describers/ConcentrationDescriber.js +++ b/js/molarity/view/describers/ConcentrationDescriber.js @@ -27,7 +27,8 @@ define( require => { const concentrationRangePatternString = MolarityA11yStrings.concentrationRangePattern.value; const qualitativeConcentrationStatePatternString = MolarityA11yStrings.qualitativeConcentrationStatePattern.value; const quantitativeConcentrationStatePatternString = MolarityA11yStrings.quantitativeConcentrationStatePattern.value; - const saturationLostAlertPatternString = MolarityA11yStrings.saturationLostAlertPattern.value; + const saturationLostQualitativeAlertPatternString = MolarityA11yStrings.saturationLostQualitativeAlertPattern.value; + const saturationLostQuantitativeAlertPatternString = MolarityA11yStrings.saturationLostQuantitativeAlertPattern.value; const saturationReachedAlertString = MolarityA11yStrings.saturationReachedAlert.value; const stillSaturatedAlertPatternString = MolarityA11yStrings.stillSaturatedAlertPattern.value; const withSolidsAlertPatternString = MolarityA11yStrings.withSolidsAlertPattern.value; @@ -356,12 +357,15 @@ define( require => { * */ getSaturationChangedString() { assert && assert( this._saturationStateChanged, 'saturation state has not changed' ); + const saturationLostAlertString = this.useQuantitativeDescriptionsProperty.value ? + saturationLostQuantitativeAlertPatternString : + saturationLostQualitativeAlertPatternString; return this.solution.isSaturated() ? StringUtils.fillIn( saturationReachedAlertString, { solidAmount: this.getCurrentSolidsAmount(), concentration: this.getCurrentConcentrationClause( true ) } ) : - StringUtils.fillIn( saturationLostAlertPatternString, { + StringUtils.fillIn( saturationLostAlertString, { concentration: this.getCurrentConcentrationClause( true ) } ); } diff --git a/js/molarity/view/describers/SoluteDescriber.js b/js/molarity/view/describers/SoluteDescriber.js index 5adada3b..19eb9d11 100644 --- a/js/molarity/view/describers/SoluteDescriber.js +++ b/js/molarity/view/describers/SoluteDescriber.js @@ -30,9 +30,9 @@ define( require => { const noSoluteAlertQuantitativeString = MolarityA11yStrings.noSoluteAlertQuantitative.value; const noSoluteAlertQualitativeString = MolarityA11yStrings.noSoluteAlertQualitative.value; const quantitativeConcentrationStatePatternString = MolarityA11yStrings.quantitativeConcentrationStatePattern.value; + const soluteChangedQuantitativeConcentrationPatternString = MolarityA11yStrings.soluteChangedQuantitativeConcentrationPattern.value; const soluteChangedSaturatedAlertPatternString = MolarityA11yStrings.soluteChangedSaturatedAlertPattern.value; const soluteChangedUnsaturatedAlertPatternString = MolarityA11yStrings.soluteChangedUnsaturatedAlertPattern.value; - const soluteChangedQualitativePatternString = MolarityA11yStrings.soluteChangedQualitativePattern.value; // color strings const redString = MolarityA11yStrings.red.value; @@ -180,10 +180,9 @@ define( require => { if ( this.solution.isSaturated() ) { soluteChangedString = soluteChangedSaturatedAlertPatternString; concentrationClause = useQuantitativeDescriptionsProperty.value ? - StringUtils.fillIn( quantitativeConcentrationStatePatternString, { + StringUtils.fillIn( soluteChangedQuantitativeConcentrationPatternString, { concentration: this.concentrationDescriber.getCurrentConcentrationClause() - } ) : - soluteChangedQualitativePatternString; + } ) : ''; } else { soluteChangedString = soluteChangedUnsaturatedAlertPatternString; @@ -191,7 +190,7 @@ define( require => { StringUtils.fillIn( quantitativeConcentrationStatePatternString, { concentration: this.concentrationDescriber.getCurrentConcentrationClause() } ) : - this.concentrationDescriber.getCurrentConcentrationClause(true); + this.concentrationDescriber.getCurrentConcentrationClause( true ); } return StringUtils.fillIn( soluteChangedString, {