Page MenuHomePhabricator

Date headings on special pages should use appropriate heading level
Open, Needs TriagePublicBUG REPORT

Description

As @Jdlrobson pointed out in the comments for T298638: Make modifications to Pager HTML to add heading separators to support Minerva skinning, currently Special:RecentChanges and Special:Watchlist insert <h4> date headings after <h1>. After T298638 goes live, a bunch of other special pages and ?action=history will also use <h4> for date headings. This is a common accessibility mistake that is prescribed to be avoided by most accessibility guidelines:

Skipping heading ranks can be confusing and should be avoided where possible: Make sure that a <h2> is not followed directly by an <h4>, for example. https://www.w3.org/WAI/tutorials/page-structure/headings/

Do not skip heading levels to be more specific (for example, do not skip from <h2> to <h5>). It is permissible to skip headings in the other direction if the outline of the page calls for it (for example, from <h5> to <h2>). https://usability.yale.edu/web-accessibility/articles/headings

Do not skip a heading level from the top down. https://www.a11yproject.com/posts/how-to-accessible-heading-structure/

I would assume that <h4> was chosen in the olden years because of its (regular) font size, and not much else. However, it makes the interface less accessible. I think we should find some way to work around this (either by upping the level, adding appropriate CSS to make the text smaller, or even aria-level="2" I guess ¯\_(ツ)_/¯).