-
Notifications
You must be signed in to change notification settings - Fork 17
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
Update table markdown guidance #149
Conversation
|
||
- Centre: `|:---:|` | ||
- Right: `|---:|` | ||
|
||
Add more columns and rows as needed. | ||
If a table has three or more columns, you likely need to set a row header in addition to the column headers. Setting a row header improves the experience for screen reader users, as it reduces the amount of information they need to remember while navigating the table. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Style point: "three" => "3".
- Recommend rephrasing "you likely need to" to "you might need to"
- Recommend adding a link to the W3 accessibility tutorials on tables at https://www.w3.org/WAI/tutorials/tables/ for more information to help people decide if they need to add a row header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review 👍 I've pushed up an amended commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Content looks good overall @ChrisBAshton. I've commented on a few specific things.
This removes the requirement to add a `<div>` above and below tables. This was originally required because omitting them would break the table completely, but this no longer seems to be an issue. The spacing between the table and the surrounding content is now slightly reduced as a result, but this should be fixed with CSS in the tech docs gem, rather than with non-semantic content. This commit also documents new accessibility guidance whereby tables with 3 or more columns need a row header, introduced in alphagov/tech-docs-gem#214. While I'm here, I've updated the markdown example to use padded cells for horizontal alignment, which is good practice if there is room to do so. I've also omitted the `|:---|` left-alignment instruction, since cells are left-aligned by default. Most markdown table examples you'll come across in the wild use the default `|---|` separator.
This removes the requirement to add a
<div>
above and below tables. This was originally required because omitting them would break the table completely, but this no longer seems to be an issue. The spacing between the table and the surrounding content is now slightly reduced as a result, but this should be fixed with CSS in the tech docs gem, rather than with non-semantic content.This commit also documents new accessibility guidance whereby tables with 3 or more columns need a row header, introduced in alphagov/tech-docs-gem#214.
While I'm here, I've updated the markdown example to use padded cells for horizontal alignment, which is good practice if there is room to do so. I've also omitted the
|:---|
left-alignment instruction, since cells are left-aligned by default. Most markdown table examples you'll come across in the wild use the default|---|
separator.Context
Changes proposed in this pull request
Guidance to review