Assistive technologies, such as screen readers, use ``++
++`` headers to provide some context when users navigates a table. Without it the user gets rapidly lost in the flow of data.
Headers should be properly associated with the corresponding ``++ | ++`` cells by using either a ``++scope++`` attribute or ``++headers++`` and ``++id++`` attributes. See https://www.w3.org/WAI/tutorials/tables/tips/[W3C WAI Web Accessibility Tutorials] for more information.
This rule raises an issue whenever a ``++++`` does not contain any ``++++`` elements.
== Noncompliant Code Example
----
Name |
Age |
John Doe |
24 |
Alice Doe |
54 |
----
== Compliant Solution
----
Name |
Age |
John Doe |
24 |
Alice Doe |
54 |
----
== Exceptions
No issue will be raised on used for layout purpose, i.e. when it contains a ``++role++`` attribute set to ``++"presentation"++`` or ``++"none"++``. Note that https://www.w3schools.com/html/html_layout.asp[using for layout purpose is a bad practice].
No issue will be raised on containing an ``++aria-hidden++`` attribute set to ``++"true"++``.
== See
* https://www.w3.org/WAI/WCAG21/quickref/?versions=2.0#qr-content-structure-separation-programmatic[WCAG2, 1.3.1] - Info and Relationships
* https://www.w3.org/TR/WCAG20-TECHS/H51[WCAG2, H51] - Using table markup to present tabular information
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
include::highlighting.adoc[]
endif::env-github,rspecator-view[]
| |