mirror of
https://github.com/videojs/video.js.git
synced 2025-03-29 22:07:10 +02:00
fix(player): ensure that JAWS+IE announces the BPB and play button (#5173)
Freedom Scientific's recommended workaround for JAWS + IE not announcing the first button after a video element which doesn't have its own native controls (See https://github.com/FreedomScientific/VFO-standards-support/issues/78). Fixes #4583
This commit is contained in:
parent
f5a6e61627
commit
2bc810decb
@ -32,6 +32,7 @@ import * as middleware from './tech/middleware.js';
|
||||
import {ALL as TRACK_TYPES} from './tracks/track-types';
|
||||
import filterSource from './utils/filter-source';
|
||||
import {findMimetype} from './utils/mimetypes';
|
||||
import {IE_VERSION} from './utils/browser';
|
||||
|
||||
// The following imports are used only to ensure that the corresponding modules
|
||||
// are always included in the video.js package. Importing the modules will
|
||||
@ -579,8 +580,15 @@ class Player extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
// set tabindex to -1 so we could focus on the player element
|
||||
// set tabindex to -1 to remove the video element from the focus order
|
||||
tag.setAttribute('tabindex', '-1');
|
||||
// Workaround for #4583 (JAWS+IE doesn't announce BPB or play button)
|
||||
// See https://github.com/FreedomScientific/VFO-standards-support/issues/78
|
||||
// Note that we can't detect if JAWS is being used, but this ARIA attribute
|
||||
// doesn't change behavior of IE11 if JAWS is not being used
|
||||
if (IE_VERSION) {
|
||||
tag.setAttribute('role', 'application');
|
||||
}
|
||||
|
||||
// Remove width/height attrs from tag so CSS can make it 100% width/height
|
||||
tag.removeAttribute('width');
|
||||
|
Loading…
x
Reference in New Issue
Block a user