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

Fix the headings hierarchy in the Styles sidebar #42496

Closed
afercia opened this issue Jul 18, 2022 · 0 comments · Fixed by #43848
Closed

Fix the headings hierarchy in the Styles sidebar #42496

afercia opened this issue Jul 18, 2022 · 0 comments · Fixed by #43848
Assignees
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Jul 18, 2022

Description

Follow-up to #42373

The headings hierarchy in the Styles sidebar is less than ideal. It skips levels, doesn't follow a logical structure and it appears it was implemented more for visual purposes rather than for good semantics.

Suffice to say the first heading within the Styles sidebar is a H5, which doesn't make sense and it's totally disconnected from the overall headings hierarchy.

A good headings structure is not just about good semantics. Headings are also a navigational tool for screen reader users, as they can use dedicated commands to jump through headings, get a sense of the overall content, and navigate a page. This principle applies also to administration user interfaces, where headings can be used to identify the main parts of the interface.

Step-by-step reproduction instructions

  • Go to the Site editor.
  • Open the Styles sidebar.
  • Click 'Colors'.
  • Check the 'Colors' text to the right of the back button is a H5 heading. This is incorrect.
  • Check that 'Palette' and 'Elements' are H2 headings. This doesn't communicate a proper hierarchy.
  • Click 'Buttons'.
  • Check the 'Buttons' text to the right of the back button is a H5 heading. This is incorrect.
  • Check the 'Text color' heading underneath 'Buttons' is a H4 heading. This is incorrect because 'Text color' should be a sub-heading of 'Buttons'.
  • Check the all-caps text 'THEME' is a H2 heading. It should be a sub-heading of 'Text color'.
  • Check the all-caps text 'DEFAULT' is a H2 heading. It should be a sub-heading of 'Text color'.
  • Check 'Background color' is a H2 heading. It skips a heading level but it should probably be a H2 in the first place.
  • Check the all-caps text 'THEME' is a H2 heading. It should be a sub-heading of 'Background color'.
  • Check the all-caps text 'DEFAULT' is a H2 heading. It should be a sub-heading of 'Background color'.

Hint; Use the HeadingsMap browser extension to check the headings hierarchy.

Screenshots, screen recording, code snippet

Worth mentioning the HeadingsMap browser extension only highlights skipped heading levels, and in the screenshot below there are a few headings highlighted as errors. It doesn't evaluate whether a heading level is logically correct or not, which requires evaluation by a human.

Screenshot 2022-07-18 at 12 07 53

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

@afercia afercia added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). labels Jul 18, 2022
@afercia afercia self-assigned this Jul 25, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Sep 5, 2022
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants