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

Rule suggestion: detect SC 1.2.1 violations for video-only content without alternative/transcript/audio track #4596

Open
1 task done
AllThingsSmitty opened this issue Oct 2, 2024 · 1 comment
Labels
feat New feature or enhancement rules Issue or false result from an axe-core rule

Comments

@AllThingsSmitty
Copy link

AllThingsSmitty commented Oct 2, 2024

Product

axe-core

Product Version

No response

Latest Version

  • I have tested the issue with the latest version of the product

Issue Description

Per the Google Chrome Lighthouse page, filing issue about a specific accessibility audit here.

Expectation

Running a Lighthouse scan of a page where a separate accessibility scan tool we pay for has flagged the page as failing to pass WCAG 2.2 SC 1.2.1: Audio-only and Video-only (Prerecorded).

The page contains a video being used as a background image banner, which copy and CTAs on top. When running Lighthouse we're expecting it to catch this issue and report the problem so it may be fixed during development.

Actual

Lighthouse reports a perfect score on the page in question. It does provide an audio and video summary of features it detected. However, it's not finding the WCAG 2.2 SC 1.2.1: Audio-only and Video-only (Prerecorded) issue.

How to Reproduce

Additional context

Any thing else we should know about the issue?

@AllThingsSmitty AllThingsSmitty added the ungroomed Ticket needs a maintainer to prioritize and label label Oct 2, 2024
@dbjorge
Copy link
Contributor

dbjorge commented Oct 3, 2024

Thanks for the suggestion! We agree that it would be awesome if we could add a new axe-core rule that detected SC 1.2.1 violations in video-only <video> elements like this example.

The main reason that axe-core doesn't have such a rule today is that it is technically challenging to create such a rule without false positives (ie, to guarantee that if we say "this <video> element is a violation", that it really is an SC 1.2.1 violation). Part of axe-core's philosophy that sets it apart from other accessibility scanning tools is that we are very strict about avoiding false positives.

The reason it's difficult to avoid false positives in this specific case is that there are several techniques an author can use to pass SC 1.2.1, and some of them are difficult to detect automatically:

  1. The author can provide an "alternative for time-based media" (a transcript) for the video-only content. The SC is loose about what format this is allowed to take on. Particularly, it does not require that it be programmatically associated to the video; in fact, it is admissible for it to be an entirely separate document that is merely linked from the page with the video.
  2. The author can label the video as a "media alternative for text". Again, the SC does not require that this labelling be programmatically associated with the video; it might appear anywhere on the page.
  3. The author can provide an audio track the presents equivalent information.

axe-core could detect the absence of an audio track similarly to how the video-caption rule works, but it would be very difficult to determine automatically whether cases 1 or 2 might apply without false positives.

While I think this would be challenging to turn into an axe-core rule, I do think this could be a good candidate for something like an axe DevTools Pro Intelligent Guided Test.

@dbjorge dbjorge added feat New feature or enhancement rules Issue or false result from an axe-core rule and removed ungroomed Ticket needs a maintainer to prioritize and label labels Oct 3, 2024
@dbjorge dbjorge changed the title WCAG 2.2 SC 1.2.1 not flagged for video being used as background image banner Rule suggestion: detect SC 1.2.1 violations for video-only content without alternative/transcript/audio track Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or enhancement rules Issue or false result from an axe-core rule
Projects
None yet
Development

No branches or pull requests

2 participants