Skip to content

Responsive tables and validation errors #174

Closed

Description

@marynicholson3

When adding responsive to tables we get validation errors:
"The role attribute must not be used on a td element which has a table ancestor with no role attribute, or with a role attribute whose value is table, grid, or treegrid."

Can these be looked at / amended please?

Activity

  1. colinrotherham commented on Sep 29, 2025

    @colinrotherham
    Collaborator

    The warning can safely be ignored

    Responsive tables unset the default table roles using CSS so we must set them again using HTML role attributes

    Note: Some table role attributes were missed but have been fixed in:

    If you'd like to track improvements to responsive tables there's an issue on NHS.UK frontend too:

  2. added this to the v6.0.0 milestone on Oct 1, 2025
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions