Skip to content

Commit

Permalink
Workaround for videojs#4583 (JAWS+IE doesn't announce BPB or play but…
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenEdwards committed May 24, 2018
1 parent 869d607 commit d6a07bf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -592,8 +593,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');
Expand Down

0 comments on commit d6a07bf

Please sign in to comment.