Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide feedback for broken headings structures. #29562

Closed
aristath opened this issue Mar 4, 2021 · 8 comments
Closed

Provide feedback for broken headings structures. #29562

aristath opened this issue Mar 4, 2021 · 8 comments
Labels
[Block] Heading Affects the Headings Block [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Enhancement A suggestion for improvement.

Comments

@aristath
Copy link
Member

aristath commented Mar 4, 2021

What problem does this address?

If the user adds headings in the wrong order (for example starts with an h3 followed directly by an h6), there is no feedback about the wrong structure.

What is your proposed solution?

Users should be warned about skipped heading levels.
This could be done as a notification, or if they have a table-of-contents block it can happen in there as well. Since the TOC block will be parsing the headings, it will be possible to detect any abnormalities and inform the user so they can improve their structure.

@aristath aristath added the [Type] Enhancement A suggestion for improvement. label Mar 4, 2021
@jdevalk
Copy link
Contributor

jdevalk commented Mar 4, 2021

Note that this will need a dev note, because this might mean some existing plugins need to update their functionality / remove their functionality that does exactly this :)

@mtias
Copy link
Member

mtias commented Mar 4, 2021

I think we should use the same mechanisms we have in the doc outline:

image

We could fold this into this broader issue: "Notify about wrong level more clearly" #20870

@ZebulanStanphill
Copy link
Member

I created #22650 a while back to add some notices to the Heading block itself. Following recent discussion in #29560, I might have to refactor it again to remove support for non-Heading-block headings, but the UI is finished, unless anyone has some suggestions for improvement.

@mtias
Copy link
Member

mtias commented Mar 10, 2021

@ZebulanStanphill yes, I think that one is mostly ready. Agreed on focusing on only block headings for now.

@paaljoachim
Copy link
Contributor

How is this issue and associated PR's coming along?

@ZebulanStanphill
Copy link
Member

@paaljoachim The UI probably needs to be redesigned again, because now the heading level options are listed vertically, rather than horizontally.

Any ideas on how it should look? I suppose you could just put the warning to the right of the options, but I'm not sure if that's the right approach. Furthermore, there was a link to a help page about headings which was always shown in the popover, and if that was kept, it would force the popover to always be much larger than it is currently.

Basically, how do I rework this old design:
image

... so it works with this:
image

@paaljoachim
Copy link
Contributor

Hey @ZebulanStanphill

I assume it would be something like this:

Invalid-heading-levels

As Joen @jasmussen has been working on the Heading block I would assume he might have some thoughts on this as well.

@skorasaurus skorasaurus added [Block] Heading Affects the Headings Block [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). labels Jul 27, 2023
@skorasaurus
Copy link
Member

@aristath :

#10581 covers this quite a bit; please reopen if there's not enough overlap between the two issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Heading Affects the Headings Block [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

6 participants