mirror of
https://github.com/videojs/video.js.git
synced 2024-12-25 02:42:10 +02:00
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
This commit is contained in:
parent
fefd52573e
commit
c35c45b03a
@ -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_);
|
||||
|
Loading…
Reference in New Issue
Block a user