Make WordPress Core

Opened 3 years ago

Last modified 2 weeks ago

#39763 reviewing defect (bug)

W3C Error with get_calendar()

Reported by: Harry Milatz Owned by: SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: minor Version: 4.7.2
Component: General Keywords: good-first-bug needs-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 5 months ago.

Download all attachments as: .zip

Change History (11)

@Harry Milatz
3 years ago

"correctet" file without produce the error

#1 @desrosj
6 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.

6 months ago

#3 @abhijitrakas
5 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.


5 months ago

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

5 weeks ago

#5 @SergeyBiryukov
5 weeks ago

  • Milestone changed from Future Release to 5.4
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#6 @SergeyBiryukov
4 weeks ago

  • Keywords commit added

Tested 39763.diff, looks good to me.

Tentatively marking for commit, pending feedback from the Accessibility team.

This ticket was mentioned in Slack in #accessibility by sergey. View the logs.

3 weeks ago

#8 @SergeyBiryukov
2 weeks ago

  • Keywords needs-patch added; has-patch removed

Per feedback from @joedolson in #accessibility:

the tfoot element should not contain controls - it should only contain <th> cells that act as headings. So, yes, I'd call that a problem.
The previous/next links really shouldn't be inside the table.

Looks like some investigation is needed on moving those links out of the table and how many themes having styles for the widget would be affected by that.

#9 @SergeyBiryukov
2 weeks ago

  • Keywords commit removed
Note: See TracTickets for help on using tickets.