mirror of
https://github.com/videojs/video.js.git
synced 2024-12-04 10:34:51 +02:00
fix: make sure all attributes are updated before applying to tag (#5416)
Fixes #5309
This commit is contained in:
parent
6d6bfd1420
commit
b25f024a04
@ -591,18 +591,28 @@ class Player extends Component {
|
||||
|
||||
// set tabindex to -1 to remove the video element from the focus order
|
||||
tag.setAttribute('tabindex', '-1');
|
||||
attrs.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');
|
||||
attrs.role = 'application';
|
||||
}
|
||||
|
||||
// Remove width/height attrs from tag so CSS can make it 100% width/height
|
||||
tag.removeAttribute('width');
|
||||
tag.removeAttribute('height');
|
||||
|
||||
if ('width' in attrs) {
|
||||
delete attrs.width;
|
||||
}
|
||||
if ('height' in attrs) {
|
||||
delete attrs.height;
|
||||
}
|
||||
|
||||
Object.getOwnPropertyNames(attrs).forEach(function(attr) {
|
||||
// don't copy over the class attribute to the player element when we're in a div embed
|
||||
// the class is already set up properly in the divEmbed case
|
||||
|
Loading…
Reference in New Issue
Block a user