While building web pages to be accessible, heading levels are recommended to allow for optimal navigation for users of screen readers. Heading levels allow for scanning the page, much the way sighted users scan based on visual treatment such as bold or font styles. Interestingly though there is differing opinion as to whether heading levels are required by WCAG. It does not directly state the requirement as indicated by TPGi in a related article, "Heading off confusion: When do headings fail WCAG?"
Either way, Pega does recognize the best practice and does assign heading levels as best we can based on our out-of-the-box template design. Customizing the design can impact this optimal heading level order of course. But why does Pega include a heading level 6 at the end of every page in Constellation, even if the prior heading level is a 2 or 3, thus out of numerical order?
Constellation Live log
The reason we include this heading level 6 is to allow for a collection of all the status messages for the page, or what we at Pega call, our "Live log" of notifications. This live log allows for screen readers to review any of the status messages that were provided as they interacted with the screen. Depending on the application, there could be many messages so allowing for a method to review is beneficial for a screen reader user. Also having a consistent location, allows them to access this log at any time on any page. We chose heading level 6 as it would always be the last on the page.
So while, our approach may not follow exact best practices of heading levels, we feel this was our best option for the following reasons:
- Screen reader users would have a method to review status messages at any time
- The messages would always be in a consistent place so thus would know where to find it
- The messages would always be in the last heading level on the page
- Including the option is not a direct failure of WCAG
In reviewing our approach with our auditor, they agreed the benefit outweighed the recommended approach and did not present a direct failure. We hope you agree as well.