소스 검색

only announce current fragment to screen readers

Hakim El Hattab 5 년 전
부모
커밋
8709a41979
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      js/controllers/fragments.js

+ 3 - 3
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 );
 						}