Skip to content

fixes 1822 - table irregular headers example 2 code doesn't match cod…#1943

Open
becka11y wants to merge 1 commit intow3c:mainfrom
becka11y:1822-example-code-mismatch
Open

fixes 1822 - table irregular headers example 2 code doesn't match cod…#1943
becka11y wants to merge 1 commit intow3c:mainfrom
becka11y:1822-example-code-mismatch

Conversation

@becka11y
Copy link
Copy Markdown
Collaborator

@becka11y becka11y commented Apr 2, 2026

…e on main page
Resolves #1822
table irregular headers example 2 code doesn't match code on main page

Example #2 in the Tables > Irregular Headers page contains a link to the full code. This code appears to be just the snippet and the code in the main tutorial page is the full code rather than vice versa. Rather than modify/shorten the existing "snippet" on the main page and cause more confusion, I updated the example code to match this full code. The full example code link now contains the correct, full code.

I also updated the changelog since this would affect anyone who was using the example code.

@netlify /tables/irregular/

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 2, 2026

Deploy Preview for wai-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 87b097d
🔍 Latest deploy log https://app.netlify.com/projects/wai-website/deploys/69cebeb447ebd5000895489d
😎 Deploy Preview https://deploy-preview-1943--wai-website.netlify.app/tables/irregular/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@becka11y becka11y assigned becka11y and remibetin and unassigned becka11y Apr 2, 2026
@remibetin
Copy link
Copy Markdown
Member

Thanks @becka11y.

This code appears to be just the snippet

It also does not apply the tutorial guidance regarding the use <thead>, <tbody>, and <tfoot> elements.

I've found a 2014 draft of the tutorial in CVS with this code. When the <thead> <tbody> and <tfoot> guidance was added, the "code snippet" was updated, but the full example page was not. So, I assume it was just an oversight at the time.

the code in the main tutorial page is the full code

Considering this, I'm not sure a full example code page is needed. How about removing the page and the "Full code example" link?

@remibetin remibetin assigned becka11y and unassigned remibetin Apr 3, 2026
@becka11y
Copy link
Copy Markdown
Collaborator Author

becka11y commented Apr 3, 2026

@remibetin I'm fine with removing the full code link, but I was concerned about having a broken link in case anyone had referenced that page. I also wonder about the advice to include elements that have empty content (I'm old school when memory and bandwidth was limited; I avoid adding extra code ;). In this case, that would be the . The HTML spec does allow this. But, from an accessibility perspective, I don't see this added structure making a difference for accessibility. It seems that the thead, tbody, and tfoot provide structural relevance and are used for styling but they make no difference for screen reader announcement. The proper use of is most important for screen reader navigation of tables. The rows within are just announced as additional rows, the screen readers don't provide any announcement of the footer grouping and I didn't find any mechanisms to navigate quickly through table structure by head, body, and foot via screen readers.
But,since an empty is allowed. I can add that into the code to this example if you want. Then at least we are following the advice on the page. Let me know if you want to remove the link to the "full" example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tables with Irregular Headers - full code example does not match code on source page

2 participants