Skip to content

[Feature]: Add video captions validation check for core/video block #30

Open

Description

@huzaifaalmesbah

Which area does this relate to?

Block validation rule

Is your feature request related to a problem?

Currently, the "Core block accessibility rules" module validates several core blocks (core/image, core/button, core/table, core/heading, core/gallery), but lacks any accessibility validation for core/video.

According to WCAG 2.1 Success Criterion 1.2.2 (Captions - Prerecorded - Level A), prerecorded video content with audio must provide captions or subtitles for deaf or hard-of-hearing users. When content authors embed or upload videos into WordPress posts without text tracks, users who rely on assistive caption tracks are unable to comprehend the dialogue and critical audio information.

Describe the solution you'd like

Add a check_video_tracks validation check for the core/video block in the Core block accessibility rules module:

  • Starting Level: warning (advisory, to encourage accessibility best practices without hard-blocking publication on silent videos or background clips; administrators can elevate it to error via the Validation Settings admin screen if desired).
  • Behavior:
    • If a video block has a media source attached (src or id) but contains no caption or subtitle tracks (tracks), flag an advisory warning: "Consider adding captions or subtitles to this video."
    • If the block is unconfigured (empty placeholder without media), do not trigger false-positive warnings.
    • Once a caption or subtitle track (kind === 'captions' or kind === 'subtitles') is added, the warning automatically clears.

Describe alternatives you've considered

  • Defaulting to error level: Videos without audio (e.g., silent demo clips) do not strictly require captions under WCAG 1.2.2. Setting the default severity to warning encourages authors to add captions without blocking publishing.
  • Autoplay muting rule: Considered adding an autoplay/muted check, but Gutenberg's core Video block already automatically enforces muted: true whenever autoplay is enabled, making that rule redundant.

Checklist

  • I have searched existing issues to make sure this isn't a duplicate.

Activity

  1. added a commit that references this issue on Oct 9, 2026
    027e78f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions