Skip to content

Remove suggestion that order of table elements isn't important #32909

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

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

Mallonbacka
Copy link
Contributor

Description

As stated in the related issue, the suggestion that <thead>, <tfoot> and <tbody> can be given in any order as children of a <table> deviates from the HTML spec, and causes the presentation to screen reader users to deviate from the visual structure, at least on one browser/AT combination.

Motivation

While it makes no difference most of the time, there is a case where this practice can be observed causing problems for a small set of assistive technology users. Since the practice deviates from the HTML spec, this also ensures that what MDN recommends to readers follows the specification.

I also found line 72 unclear, as it seemed to conflict with the prior content on line 71 - if the body can appear below the footer, how does the footer always appear at the bottom? I've removed the unclear part, so that the order (according to the specification) is unambiguous - <thead>, <tbody>, <tfoot>.

Additional details

Related issues and pull requests

Fixes #32798

@Mallonbacka Mallonbacka requested a review from a team as a code owner April 1, 2024 08:47
@Mallonbacka Mallonbacka requested review from chrisdavidmills and removed request for a team April 1, 2024 08:47
@github-actions github-actions bot added Content:Learn:HTML Learning area HTML docs size/xs [PR only] 0-5 LoC changed labels Apr 1, 2024
Copy link
Contributor

github-actions bot commented Apr 1, 2024

Preview URLs

(comment last updated: 2024-04-02 07:12:43)

Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there @Mallonbacka, and thanks so much for your contribution to MDN! I totally agree with the motivation for making this change, and I think your suggestions work well. I've just got one wording suggestion for you to consider, after which we can get it merged.

@github-actions github-actions bot added size/s [PR only] 6-50 LoC changed and removed size/xs [PR only] 0-5 LoC changed labels Apr 2, 2024
Remove suggestion that order of table elements isn't important, and
consistently refer to them, in this section, in the order they are used.
Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great, thanks @Mallonbacka! I just made one tiny change, and now I think we are ready to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Learn:HTML Learning area HTML docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid suggesting that <tfoot> can be placed before <tbody>
3 participants