-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Incorrect headings hierarchy in the Site Editor #42373
Comments
Note: I think the Component that uses the H4 heading with the template name is reused in other places (the Show tempalte details panel, the Settings sidebar). I'm not sure it should use a heading in the first place, though. |
Updating the issue title as the problem applies to the whole site editor. |
The main H1 heading in the Site Editor is rendered by the There's some visually hidden text there. The actual heading text is, for example:
While the heading text is meaningful, the heading placement is not ideal. Actually, this H1 heading comes after the Navigation sidebar and after the toolbar in the header. Ideally, the main H1 should be the first thing within the I think the main H1 should be generated on the WordPress PHP side, as it's the case for the H1 in the post editor. I'll create a core ticket on Trac. |
Created https://core.trac.wordpress.org/ticket/56228 for the core part. |
I'd really like to see this end up in WordPress 6.2; can we coordinate with people to get the PR merged? Not sure who to connect with; if @annezazu can suggest who should own this, that would be great. Proper headings are a basic level of accessibility that will really help users. I can just commit https://core.trac.wordpress.org/ticket/56228, but by itself that will result in a duplicate H1. |
Thanks for tagging me in this! I've added it to the 6.2 board for consideration. @youknowriad since this touches on Browse mode a bit, I wanted to lightly note for you in case you might have time to help with this. |
Thanks for creating the issue.
I'm not sure this is good solution because the site editor is essentially an SPA meaning, there will be navigation that is supposed to change the H1. The latest iteration of the site editor includes a "hub" that shows the current context. I think that's the ideal place to show the H1 (the currently edited template/template-part...). It's just a div now but it can be made an H1. I'm also going to ping @WordPress/gutenberg-design here as they're working on small iterations there so we can include this fix in the iterations that are planned for 6.2 |
@youknowriad in the related PR #42495 the current H1 of this 'SPA' will stay functionally unchanged. For example the current H1 The core patch will add a visually hidden H1: I think this is the most reasonable thing to do from a semantics and accessibility perspective.
|
I think it's arguable since that state is persisted in the URL and refreshing the page will land you directly in the "editing said template" state. |
I actually have a different opinion, please see my comment here. https://core.trac.wordpress.org/ticket/56228#comment:14
|
@alexstine thanks. I'm not sure I understand how region navigation relates to the main H1 heading. Can you please expand a bit, when you have a change? It's important to take into consideration that the whole Editor renders within a page that is generated by core. There is a
That's equivalent to a Also, things are a bit more complex after the introduction of the Site editor 'browse more', which is the initial state of the Site editor. This makes the user experiences in the Site editor a it different from the one in the Post editor. In the Site editor 'browse mode', right now there's only a H2 heading that says 'Design'. That's less than ideal and needs to be fixed. |
@afercia Try this.
Moving the heading 1 under React management should avoid this problem. Thanks. |
@alexstine thanks, for the clarification I understand now. It's a bit complicated, pretty confusing.
Placing the H1 inside the editor would only facilitate a bit the flow, as in:
This would only work for screen reader users. It won't work for other keyboard users, as they can't 'jump' to the H1. However, there are countless ways for screen reader users to jump directly into the editor e.g. jumping to a H2 heading, jumping to the first form control, etc. |
@afercia The h1 is still outside of the React part of Gutenberg though so it will not work. The flow would look like this for screen reader users.
|
@SaxonF @jameskoster @jasmussen flagging this for you all as browse mode evolves for 6.2. In particular, it looks like #47241 was overwritten amidst the various changes (discovered when chatting with @carolinan) and it would be great to get it incorporated back in. |
Thanks for the ping. Definitely seems like a bug to fix. Does it need any design input? Apologies if I'm missing nuance, but this seems mostly like an oversight. |
I don't think it needs any design feedback; the headings don't need to look any different from the existing text, they just need to be semantically fixed. |
Does this need any assistance to get it moving? |
Description
In the Site Editor Template browser, the headings hierarchy is incorrect:
Step-by-step reproduction instructions
HeadingsMap
to quickly check the headings on the page.HeadingsMap
extension.Screenshots, screen recording, code snippet
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: