An accessible calendar may use a table when you are displaying dates for reading. An interactive date-picker is a different kind of widget and needs keyboard and focus behavior that a plain table does not provide. Before writing the code, picture the information as a small grid. Each label should help a reader understand the value next to it.
What You Need to Know
Use day headings and clear date labels for a read-only calendar. Do not pretend that clickable td cells alone create an accessible calendar application.
Read a table like a story about data. The caption says what you are looking at; row and column headers explain what the numbers or words mean.
Example: See It in Action
Try this markup in a fresh practice file. The next section explains the parts worth paying attention to.
This is a short HTML fragment. To try it as a webpage, put it inside the body element of a complete HTML document.
<table>
<caption>October 2026</caption>
<thead>
<tr>
<th scope="col">Mon</th>
<th scope="col">Tue</th>
<th scope="col">Wed</th>
</tr>
</thead>
<tbody>
<tr>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
</tbody>
</table>
Let’s Understand the Example
- Table represents information whose row and column relationships matter.
- Caption gives the whole data table a clear name.
- Scope explains which table row, column or group a th cell labels.
Look at a data cell and ask: “What row and column does this value belong to?” The header elements help answer that question, including for people who navigate the table with a screen reader.
What Should You See?
You should see a grid for “October 2026”, with headers such as “Mon”, “Tue”, “Wed”. The browser displays cells, but meaningful table markup also helps readers connect each cell to its labels.
Read the first data row aloud together with its column labels. If you cannot explain a value without pointing to its position on screen, strengthen the headers.
Try It Yourself
- Add a week row and explain whether your calendar is display-only or interactive.
- Save your changes, open or refresh the page, and compare the result with the original example.
- Tell a friend what your change did. If you are not sure, undo it, refresh the page, and compare.
Common Beginner Mistakes
- Making date cells clickable without keyboard interactions or names.
- Do not replace actual header cells with bold ordinary cells. Header markup is part of the meaning, not just the appearance.
Key Takeaways
- An accessible calendar may use a table when you are displaying dates for reading.
- Table represents information whose row and column relationships matter.
- Use day headings and clear date labels for a read-only calendar. Do not pretend that clickable td cells alone create an accessible calendar application.