diff --git a/mon-pix/app/components/assessment-banner.hbs b/mon-pix/app/components/assessment-banner.hbs index ad97157428b..79702d4e9fc 100644 --- a/mon-pix/app/components/assessment-banner.hbs +++ b/mon-pix/app/components/assessment-banner.hbs @@ -13,7 +13,7 @@ <:triggerElement> <:tooltip> diff --git a/mon-pix/app/components/assessment-banner.js b/mon-pix/app/components/assessment-banner.js index 3786130dde6..de94f55961c 100644 --- a/mon-pix/app/components/assessment-banner.js +++ b/mon-pix/app/components/assessment-banner.js @@ -9,10 +9,6 @@ export default class AssessmentBanner extends Component { @tracked showClosingModal = false; - get textToSpeechIcon() { - return this.args.isTextToSpeechActivated ? 'volume-high' : 'volume-xmark'; - } - get textToSpeechTooltipText() { return this.args.isTextToSpeechActivated ? this.intl.t('pages.challenge.statement.text-to-speech.deactivate') diff --git a/mon-pix/app/components/challenge-statement.hbs b/mon-pix/app/components/challenge-statement.hbs index 7e7729b6cfb..9999ad2fd81 100644 --- a/mon-pix/app/components/challenge-statement.hbs +++ b/mon-pix/app/components/challenge-statement.hbs @@ -8,11 +8,11 @@ <:triggerElement> <:tooltip> diff --git a/mon-pix/app/components/challenge-statement.js b/mon-pix/app/components/challenge-statement.js index f997f148242..6e1530f79af 100644 --- a/mon-pix/app/components/challenge-statement.js +++ b/mon-pix/app/components/challenge-statement.js @@ -18,7 +18,6 @@ export default class ChallengeStatement extends Component { @tracked displayAlternativeInstruction = false; @tracked isSpeaking = false; @tracked textToSpeechButtonTooltipText = this.intl.t('pages.challenge.statement.text-to-speech.play'); - @tracked textToSpeechButtonIcon = 'volume-high'; constructor() { super(...arguments); @@ -78,7 +77,6 @@ export default class ChallengeStatement extends Component { speechSynthesis.cancel(); this.isSpeaking = false; this.textToSpeechButtonTooltipText = this.intl.t('pages.challenge.statement.text-to-speech.play'); - this.textToSpeechButtonIcon = 'volume-high'; } else { const element = document.getElementsByClassName('challenge-statement-instruction__text')[0]; const textToSpeech = new SpeechSynthesisUtterance(element.innerText); @@ -88,7 +86,6 @@ export default class ChallengeStatement extends Component { textToSpeech.onend = () => { this.isSpeaking = false; this.textToSpeechButtonTooltipText = this.intl.t('pages.challenge.statement.text-to-speech.play'); - this.textToSpeechButtonIcon = 'volume-high'; }; this.isSpeaking = true; this.textToSpeechButtonTooltipText = this.intl.t('pages.challenge.statement.text-to-speech.stop'); @@ -112,8 +109,8 @@ export default class ChallengeStatement extends Component { this.metrics.add({ event: 'custom-event', 'pix-event-category': 'Vocalisation', - 'pix-event-action': `Assessment : ${this.args.assessment.id} Epreuve : ${this.args.challenge.id}`, - 'pix-event-name': `Click sur le bouton de vocalisation : ${this.isSpeaking ? 'lecture' : 'stop'}`, + 'pix-event-action': "Lecture d'une épreuve", + 'pix-event-name': `Clic sur le bouton de lecture d'épreuve : ${this.isSpeaking ? 'play' : 'stop'}`, }); } diff --git a/mon-pix/app/controllers/assessments/challenge.js b/mon-pix/app/controllers/assessments/challenge.js index 40034978cc3..ce40cddd91e 100644 --- a/mon-pix/app/controllers/assessments/challenge.js +++ b/mon-pix/app/controllers/assessments/challenge.js @@ -252,8 +252,8 @@ export default class ChallengeController extends Controller { this.metrics.add({ event: 'custom-event', 'pix-event-category': 'Vocalisation', - 'pix-event-action': `Assessment : ${this.model.assessment.id} Epreuve : ${this.model.challenge.id}`, - 'pix-event-name': `Click sur le bouton d'activation de la vocalisation : ${this.isTextToSpeechActivated ? 'activé' : 'désactivé'}`, + 'pix-event-action': 'Activation globale de la vocalisation', + 'pix-event-name': `Clic sur le bouton d'activation de la vocalisation : ${this.isTextToSpeechActivated ? 'activé' : 'désactivé'}`, }); } } diff --git a/mon-pix/app/styles/components/_assessment-banner.scss b/mon-pix/app/styles/components/_assessment-banner.scss index 619e1211a5a..63633a7d15c 100644 --- a/mon-pix/app/styles/components/_assessment-banner.scss +++ b/mon-pix/app/styles/components/_assessment-banner.scss @@ -90,4 +90,9 @@ .assessment-banner__text-to-speech-toggle { z-index: 1; + line-height: 0; + + button { + color: var(--pix-neutral-0); + } } diff --git a/mon-pix/tests/integration/components/challenge-statement-test.js b/mon-pix/tests/integration/components/challenge-statement-test.js index 453d9cca93d..80f6d48ab2d 100644 --- a/mon-pix/tests/integration/components/challenge-statement-test.js +++ b/mon-pix/tests/integration/components/challenge-statement-test.js @@ -298,8 +298,8 @@ module('Integration | Component | ChallengeStatement', function (hooks) { sinon.assert.calledWithExactly(add, { event: 'custom-event', 'pix-event-category': 'Vocalisation', - 'pix-event-action': `Assessment : ${this.assessment.id} Epreuve : ${this.challenge.id}`, - 'pix-event-name': 'Click sur le bouton de vocalisation : lecture', + 'pix-event-action': "Lecture d'une épreuve", + 'pix-event-name': "Clic sur le bouton de lecture d'épreuve : play", }); assert.ok(true); });