missing-semantic-data-table
Rule Severity : Moderate
Description
Content written to represent tabular data must be marked up using semantic <table>
elements. Non-tabular content should not be presented as tables, as this can mislead users of assistive technologies.
The missing-semantic-data-table
rule aligns with WCAG Success Criterion 1.3.1 (Info and Relationships), which requires that information, structure, and relationships conveyed through presentation must be programmatically determinable.
Examples
In the following example, tabular data is incorrectly presented using non-semantic elements:
In the corrected example, the same data is properly marked up using a semantic <table> structure:
How to fix?
To fix violations of the missing-semantic-data-table
rule, follow these steps:
- Identify content visually presented as tabular data.
- Ensure the content is marked up using semantic
<table>
elements, including<tr>
,<th>
, and<td>
as appropriate. - Do not use non-semantic elements (e.g.,
<div>
) to represent tabular data.
Reference
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!