1
0
mirror of https://github.com/hakimel/reveal.js.git synced 2025-08-01 12:20:33 +02:00

only announce current fragment to screen readers

This commit is contained in:
Hakim El Hattab
2020-03-13 08:58:59 +01:00
parent 92e3a3680c
commit 8709a41979

View File

@@ -197,10 +197,10 @@ export default class Fragments {
el.classList.add( 'visible' ); el.classList.add( 'visible' );
el.classList.remove( 'current-fragment' ); 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 ) { 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' ); el.classList.add( 'current-fragment' );
this.Reveal.slideContent.startEmbeddedContent( el ); this.Reveal.slideContent.startEmbeddedContent( el );
} }