Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BPB announcement and operation on Chrome with JAWS screen reader #5863

Merged
merged 1 commit into from
Apr 23, 2019

Conversation

OwenEdwards
Copy link
Member

Description

Similar to #5173, this PR adds role='application' to the video element on Chrome on Windows, to work around a JAWS screen reader bug (see FreedomScientific/standards-support#78). We only add the ARIA attribute on Chrome on Windows to avoid having any impact on Chrome on other platforms (macOS, iOS, Android, etc.)

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Change has been verified in an actual browser (Chome on Windows with JAWS, and with NVDA to ensure that it doesn't introduce a problem with NVDA)
  • Reviewed by Two Core Contributors

// 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this read "if JAWS is being used" rather than "if JAWS is not being used"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the comment is correct. Adding the ARIA role attribute doesn't affect IE11 or Chrome if JAWS isn't being used, so it doesn't matter that we can't detect whether JAWS is being used or not.

// 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)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this broken with firefox on windows with JAWS as well? If so should we just check IS_WINDOWS?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, Firefox on Windows is okay. Originally this was only reported as an issue in IE with JAWS, but as the result of some update to Chrome, it now appears in Chrome too.

@OwenEdwards
Copy link
Member Author

Note that we'll want to back-port this change to v6.x as well.

* @const
* @type {Boolean}
*/
export const IS_WINDOWS = (/Windows/i).test(USER_AGENT);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately, this makes this a minor update

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Darn!

@gkatsev gkatsev added the minor This PR can be added to a minor release. It should not be added to a patch release. label Mar 18, 2019
@gkatsev gkatsev merged commit f4154b9 into videojs:master Apr 23, 2019
@OwenEdwards OwenEdwards deleted the fix/chrome-jaws-bpb branch April 23, 2019 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed minor This PR can be added to a minor release. It should not be added to a patch release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants