Make WordPress Core

Opened 3 years ago

Last modified 3 months ago

#39763 new defect (bug)

W3C Error with get_calendar()

Reported by: Harry Milatz Owned by:
Milestone: Future Release Priority: normal
Severity: minor Version: 4.7.2
Component: General Keywords: good-first-bug has-patch
Focuses: accessibility Cc:
PR Number:


Hi @all,

The W3C Validator reports an error:
Element tbody not allowed as child of element table in this context.

If the tbody tag will be added to


before the tfoot tag is added, the error is gone.

Best regards,

Attachments (2)

general-template.php (125.7 KB) - added by Harry Milatz 3 years ago.
"correctet" file without produce the error
39763.diff (2.4 KB) - added by abhijitrakas 3 months ago.

Download all attachments as: .zip

Change History (5)

@Harry Milatz
3 years ago

"correctet" file without produce the error

#1 @desrosj
4 months ago

  • Focuses accessibility added
  • Keywords needs-patch good-first-bug added
  • Milestone changed from Awaiting Review to Future Release
  • Severity changed from normal to minor

Hi @harry-milatz,

My apologies that this ticket fell through the cracks! Are you able to create a proper patch with the suggested changes?

I just did some testing using the latest version of WordPress and Twenty Nineteen and it seems this issue still exists. After some searching, it seems that the <tfoot> element was allowed to precede the <tbody> element in HTML 5. However, that was changed in HTML 5.1 and <tfoot> must now follow <tbody>.

I am tagging this for accessibility review because moving the navigation links in <tfoot> below the table's body will likely have implications for users utilizing assistive technologies (a user may need to navigate through the entire calendar month even if it is not the desired month).

The implications this change has for CSS in themes must also be considered and tested to ensure no strangeness comes up.

This ticket was mentioned in Slack in #core by desrosj. View the logs.

4 months ago

#3 @abhijitrakas
3 months ago

  • Keywords has-patch added; needs-patch removed


I have made changes accordingly. Please check "39763.diff" file for changes. Please let me know if it needs any more changes.


3 months ago

Note: See TracTickets for help on using tickets.