mirror of
https://github.com/videojs/video.js.git
synced 2025-01-25 11:13:52 +02:00
Add role='application' to the video element on Chrome on Windows, to work around a JAWS screen reader bug (#5863)
This commit is contained in:
parent
322dae44b5
commit
f4154b9de0
@ -15,7 +15,7 @@ import * as Dom from './utils/dom.js';
|
||||
import * as Fn from './utils/fn.js';
|
||||
import * as Guid from './utils/guid.js';
|
||||
import * as browser from './utils/browser.js';
|
||||
import {IE_VERSION} from './utils/browser.js';
|
||||
import {IE_VERSION, IS_CHROME, IS_WINDOWS} from './utils/browser.js';
|
||||
import log, { createLogger } from './utils/log.js';
|
||||
import toTitleCase, { titleCaseEquals } from './utils/to-title-case.js';
|
||||
import { createTimeRange } from './utils/time-ranges.js';
|
||||
@ -664,11 +664,12 @@ class Player extends Component {
|
||||
tag.setAttribute('tabindex', '-1');
|
||||
attrs.tabindex = '-1';
|
||||
|
||||
// Workaround for #4583 (JAWS+IE doesn't announce BPB or play button)
|
||||
// Workaround for #4583 (JAWS+IE doesn't announce BPB or play button), and
|
||||
// for the same issue with Chrome (on Windows) with JAWS.
|
||||
// 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) {
|
||||
// doesn't change behavior of IE11 or Chrome if JAWS is not being used
|
||||
if (IE_VERSION || (IS_CHROME && IS_WINDOWS)) {
|
||||
tag.setAttribute('role', 'application');
|
||||
attrs.role = 'application';
|
||||
}
|
||||
|
@ -192,6 +192,15 @@ export const IS_SAFARI = (/Safari/i).test(USER_AGENT) && !IS_CHROME && !IS_ANDRO
|
||||
*/
|
||||
export const IS_ANY_SAFARI = (IS_SAFARI || IS_IOS) && !IS_CHROME;
|
||||
|
||||
/**
|
||||
* Whether or not this is a Windows machine.
|
||||
*
|
||||
* @static
|
||||
* @const
|
||||
* @type {Boolean}
|
||||
*/
|
||||
export const IS_WINDOWS = (/Windows/i).test(USER_AGENT);
|
||||
|
||||
/**
|
||||
* Whether or not this device is touch-enabled.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user