Accessibility compliance issue regarding use of h3 element in sidebar

  • Chlorine


    When using your theme, I get an accessibility compliance warning from an automated testing tool ( regarding the use of h3 elements in the title line of sidebar widgets. The text of the error message is:

    Success Criteria 2.4.6 Headings and Labels (AA)
    Check 37: Header nesting - header following h1 is incorrect.
    Repair: Modify the header levels so only an h1 or h2 follows h1. 

    The h1 element is the post-title. Since there are no h2 headings in this particular page, when we get to a sidebar widget in the HTML, the h3 element you use to format the widget title throws up this flag because there is no h2 to contain the h3. You aren’t allowed to skip a heading level.

    Please make sure the structure of the HTML document you render, complies with this accessibility guideline. Don’t forget the widgets preceding the page title, since you have widget areas up there also — it would be incorrect to have an h2 or higher preceding the h1 title, with no headings to contain it.

    Note that you can use hidden headings to achieve compliance. This would let you mark each non-empty widget area as an independent h1 without worrying about where it was in the “document” that is the page.

Viewing 1 post (of 1 total)

  • You must be logged in to reply to this topic.