Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify table headers/id example #533

Merged
merged 2 commits into from Aug 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions source/tables/multi-level.html.erb.md
Expand Up @@ -83,16 +83,19 @@ In the table below, the headers for the top half of the tables are different to
<%= sample_end %>
{:/nomarkdown}

In the following code snippet, the headers for the header cells themselves have been set to an empty cell (with the `id` “blank”). This will prevent some assistive technologies from reading a header for those heading cells.

{::nomarkdown}
<%= code_start('', 'Assigning <strong>id</strong> attributes to <code>&lt;th></code> cells') %>
{:/nomarkdown}

~~~ html
[…]
<th id="co1">Example 1 Ltd</th>
<th id="co2">Example 2 Co</th>
<td id="blank">&nbsp;</td>
<th id="co1" headers="blank">Example 1 Ltd</th>
<th id="co2" headers="blank">Example 2 Co</th>
[…]
<th id="c1">Contact</th>
<th id="c1" headers="blank">Contact</th>
[…]
~~~

Expand Down