diff --git a/mon-pix/app/pods/components/module/grain/component.js b/mon-pix/app/pods/components/module/grain/component.js index cd2fc664049..7e0288c133a 100644 --- a/mon-pix/app/pods/components/module/grain/component.js +++ b/mon-pix/app/pods/components/module/grain/component.js @@ -39,10 +39,6 @@ export default class ModuleGrain extends Component { }); } - get ariaLiveGrainValue() { - return this.args.hasJustAppeared ? 'assertive' : null; - } - @action focusAndScroll(element) { if (!this.args.hasJustAppeared) { diff --git a/mon-pix/app/pods/components/module/grain/template.hbs b/mon-pix/app/pods/components/module/grain/template.hbs index a2c6932244e..71b939440f1 100644 --- a/mon-pix/app/pods/components/module/grain/template.hbs +++ b/mon-pix/app/pods/components/module/grain/template.hbs @@ -1,9 +1,4 @@ -
+

{{@grain.title}}

{{#if @transition}} diff --git a/mon-pix/app/pods/components/module/passage/template.hbs b/mon-pix/app/pods/components/module/passage/template.hbs index 93c79d5ac79..bb09c940477 100644 --- a/mon-pix/app/pods/components/module/passage/template.hbs +++ b/mon-pix/app/pods/components/module/passage/template.hbs @@ -6,7 +6,7 @@

{{@module.title}}

-
+
{{#each this.grainsToDisplay as |grain index|}} `); - - const grainsBeforeAnyAction = screen.getAllByRole('article'); - assert.strictEqual(grainsBeforeAnyAction.length, 1); - const firstGrain = grainsBeforeAnyAction.at(-1); - assert.strictEqual(firstGrain.getAttribute('aria-live'), null); - - // when - await clickByName(continueButtonName); - - // then - const grainsAfterOneContinueActions = screen.getAllByRole('article'); - assert.strictEqual(grainsAfterOneContinueActions.length, 2); - const secondGrain = grainsAfterOneContinueActions.at(-1); - assert.strictEqual(firstGrain.getAttribute('aria-live'), null); - assert.strictEqual(secondGrain.getAttribute('aria-live'), 'assertive'); - - // when - await clickByName(continueButtonName); - - // then - const grainsAfterTwoContinueActions = screen.getAllByRole('article'); - assert.strictEqual(grainsAfterTwoContinueActions.length, 3); - const thirdGrain = grainsAfterTwoContinueActions.at(-1); - assert.strictEqual(secondGrain.getAttribute('aria-live'), null); - assert.strictEqual(thirdGrain.getAttribute('aria-live'), 'assertive'); - }); - test('should give focus on the last grain when appearing', async function (assert) { // given const store = this.owner.lookup('service:store');