From 8709a41979bf9d72d84d55ab5f6f9e8cceada967 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 13 Mar 2020 08:58:59 +0100 Subject: [PATCH] only announce current fragment to screen readers --- js/controllers/fragments.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/controllers/fragments.js b/js/controllers/fragments.js index ff5b677b..7a1b7137 100644 --- a/js/controllers/fragments.js +++ b/js/controllers/fragments.js @@ -197,10 +197,10 @@ export default class Fragments { el.classList.add( 'visible' ); el.classList.remove( 'current-fragment' ); - // Announce the fragments one by one to the Screen Reader - this.Reveal.announceStatus( this.Reveal.getStatusText( el ) ); - if( i === index ) { + // Announce the fragments one by one to the Screen Reader + this.Reveal.announceStatus( this.Reveal.getStatusText( el ) ); + el.classList.add( 'current-fragment' ); this.Reveal.slideContent.startEmbeddedContent( el ); }