Skip to content

[Feature]: Add table caption validation check for core/table block #28

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 only validates table headers (check_table_headers).

According to WCAG 1.3.1 (Info and Relationships) and Technique H39, data tables should have an associated <caption> to describe their topic or purpose. Without a caption, screen reader users navigating by tables cannot quickly determine what data the table presents before stepping through cells.

Describe the solution you'd like

Add a check_table_caption validation check to core/table in the Core block accessibility rules module:

  • Starting Level: warning (advisory, as not every small layout table strictly warrants blocking publication, and administrators can elevate it to error in Validation Settings if desired).
  • Behavior:
    • Flags a warning if the caption attribute is empty or contains only whitespace.
    • Automatically clears once a descriptive caption is provided.

Describe alternatives you've considered

Considered making it an error level check, but warning is more appropriate to prevent blocking publishes on simple presentation tables while still encouraging accessibility best practices.

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
    e19d6fc
  2. huzaifaalmesbah commented on Oct 9, 2026

    @huzaifaalmesbah
    MemberAuthor

    Update: following review feedback on #29, the starting level for check_table_caption has changed from warning to none (disabled). Technique H39 is a sufficient technique for WCAG 1.3.1 rather than a requirement, so the check is off by default and site owners can enable it as a warning or error in Validation settings.

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