Skip to content

Data tables have no th tags, captions, or scope attributes #321

Open
@viviennetrulock

Description

@viviennetrulock

Recommendation A key element in making tables accessible is by using tags to identify the relevant content columns or row. Do not use <b tags to make td cell’s content look like a table heading. As non-visual users must create this table structure in their mind, we need to provide as much support for this as possible - <th tags have a specific semantic meaning in the context of a table, where <b does not. In general avoid overly complex table structures. Scope attributes can be added to <th tags to identify whether a table header is a column header or a row header. Caption tags can also provide helpful information regarding the table - screen reader users use this to decide whether the information is relevant enough to them to attempt to parse the table. All data tables should be similarly treated.

https://frontend.dev.gov.ie/en/publication/348af0-an-analysis-of-the-2990-cases-of-covid-19-in-ireland-as-of-30-march-/

image

The final code should look like this

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions