From c35c45b03abcc0a2546cf22d0c25df7afb27e9c4 Mon Sep 17 00:00:00 2001 From: brayden-wood <126105305+brayden-wood@users.noreply.github.com> Date: Tue, 21 Mar 2023 15:55:11 -0600 Subject: [PATCH] fix: improved accessibility for time display (#8182) This change is to remove the aria-live attribute from time display elements. The aria-live attribute is no longer needed since the presentation role was added. Both attributes being present can lead to unexpected screen reader behavior. Fixes issue #8143 --- src/js/control-bar/time-controls/time-display.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/js/control-bar/time-controls/time-display.js b/src/js/control-bar/time-controls/time-display.js index 0488150c2e..109ef78ba9 100644 --- a/src/js/control-bar/time-controls/time-display.js +++ b/src/js/control-bar/time-controls/time-display.js @@ -57,13 +57,11 @@ class TimeDisplay extends Component { this.contentEl_ = Dom.createEl('span', { className: `${className}-display` }, { - // tell screen readers not to automatically read the time as it changes - 'aria-live': 'off', // span elements have no implicit role, but some screen readers (notably VoiceOver) // treat them as a break between items in the DOM when using arrow keys // (or left-to-right swipes on iOS) to read contents of a page. Using // role='presentation' causes VoiceOver to NOT treat this span as a break. - 'role': 'presentation' + role: 'presentation' }); el.appendChild(this.contentEl_);