Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Add a headings hierarchy checker notice in the heading block sidebar #10581
Previously, the headings hierarchy was placed also in the Document sidebar, in the "Table of Contents" panel:
This panel has been removed so the only way to be aware of the incorrect headings level is to intentionally check the document outline tool in the top bar.
I'd like to propose to add a notice, even a small one, directly in the Heading block sidebar so users will be immediately informed the hierarchy is not correct while they set the heading level. An option might be placing the notice under the buttons in the sidebar:
referenced this issue
Feb 14, 2019
Thinking about this, one thing I've found quite common is to have the ability to visually style one heading as though it were another heading level.
For example, say for some reason we need the 2nd level heading on the page to look like the
I know this sounds a bit odd, but in my experience, it's common that designs have headings that don't always visually follow the ideal hierarchical structure. This might help us avoid incorrect heading hierarchies.
The issue I raised about this has been superseded.
We should align with the Color Settings panel and the notice that is shown when contrast verification fails:
Should we change it as well?
I like the suggestion from @melchoyce. The wording should probably be adjusted - in the example context, either an h2 or an h3 would be valid. I think that there are two paths we can take with the error message: either make it more generic, or more specific.
With any given heading, it can always be followed by a heading that's of the same or any higher level (excepting h1, as that should only be used once on any page) or by the heading immediate lower.
"higher" and "lower" levels of headings is ambiguous, however, which makes referencing these generically somewhat difficult.
Making it specific will on rare occasion mean listing a large number of heading levels - but only in relatively rare cases, where somebody is actually using h4. (There are no invalid heading levels that can follow an h5 or an h6)
referenced this issue
Mar 26, 2019
referenced a pull request that will
Apr 9, 2019
I am removing the 'User Experience (UX)' label as part of a label cleanup. It's not being used anymore consistently so let's try and keep to 'needs design' and 'needs design feedback'. If we find a need for another label we can consider it but having those 2 should cover this.