Admin UI: change default heading level from h2 to h1#77617
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +23 B (0%) Total Size: 7.77 MB 📦 View Changed
ℹ️ View Unchanged
|
retrofox
left a comment
There was a problem hiding this comment.
It makes sense to me, and the changes are consistent. LGTM.
dd72c83 to
50ba970
Compare
|
Flaky tests detected in b9c0cf2. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/25001250521
|
…editor These Page components are rendered inside nested landmark regions within the site editor layout, where h2 is the semantically correct heading level. They were relying on the old default of 2 which changed to 1.
0b8c865 to
b9c0cf2
Compare
* admin-ui: Change default heading level to 1 in Page Header * Update CHANGELOG.md * Update all pages * Update guidelines test * add pr number to CHANGELOG.md * Remove heading level from experimental Dashboard * edit-site: Explicitly set headingLevel=2 for Page components in site editor These Page components are rendered inside nested landmark regions within the site editor layout, where h2 is the semantically correct heading level. They were relying on the old default of 2 which changed to 1. --- Co-authored-by: simison <simison@git.wordpress.org> Co-authored-by: retrofox <retrofox@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org>
|
I think this PR should be backported to 7.0. Since it cannot be cherry-picked automatically, I have manually submitted a PR: #78002 |
* admin-ui: Change default heading level to 1 in Page Header * Update CHANGELOG.md * Update all pages * Remove heading level from experimental Dashboard * edit-site: Explicitly set headingLevel=2 for Page components in site editor These Page components are rendered inside nested landmark regions within the site editor layout, where h2 is the semantically correct heading level. They were relying on the old default of 2 which changed to 1. Co-authored-by: simison <simison@git.wordpress.org> Co-authored-by: retrofox <retrofox@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org>
* admin-ui: Change default heading level to 1 in Page Header * Update CHANGELOG.md * Update all pages * Remove heading level from experimental Dashboard * edit-site: Explicitly set headingLevel=2 for Page components in site editor These Page components are rendered inside nested landmark regions within the site editor layout, where h2 is the semantically correct heading level. They were relying on the old default of 2 which changed to 1. Co-authored-by: simison <simison@git.wordpress.org> Co-authored-by: retrofox <retrofox@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org>
) * Admin UI: change default heading level from h2 to h1 (#77617) * admin-ui: Change default heading level to 1 in Page Header * Update CHANGELOG.md * Update all pages * Remove heading level from experimental Dashboard * edit-site: Explicitly set headingLevel=2 for Page components in site editor These Page components are rendered inside nested landmark regions within the site editor layout, where h2 is the semantically correct heading level. They were relying on the old default of 2 which changed to 1. Co-authored-by: simison <simison@git.wordpress.org> Co-authored-by: retrofox <retrofox@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org> * Admin UI: Fix nested landmark in Page header The Page header was rendered as a `<header>` element nested inside NavigableRegion's `role="region"` wrapper. Because `role="region"` is not an HTML sectioning element, the inner `<header>` retained its implicit `banner` role, producing a banner landmark nested inside a region landmark. Drop the `<header>` element so the wrapping region remains the sole landmark for the page surface. * Admin UI: Add CHANGELOG entry for nested landmark fix Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: simison <simison@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org>
This updates the pinned hash from the `gutenberg` from `c15cef1d6b07f666df28dac0383bafb0edfe0914 ` to `3a4e8d1418d25da83b70158bcaabf65580690b6b`. The following changes are included: - [WP.7.0] Admin UI: Backport accessibility fixes (WordPress/gutenberg#77617, WordPress/gutenberg#78001) (WordPress/gutenberg#78002) - Fix: Shortcode block does not render in Navigation Overlay (WordPress/gutenberg#77511) - feat: Enhance Connectors page on read-only file system (WordPress/gutenberg#77521) - Connectors: Avoid using centered text (WordPress/gutenberg#78125) - Revisions: Add tooltip to diff marker buttons (WordPress/gutenberg#77690) - Add backport for WP_ALLOW_COLLABORATION (WordPress/gutenberg#78160) - Add aria-label to Revisions button in Post Summary sidebar (WordPress/gutenberg#78140) - Revisions diff markers: enforce 24×24px minimum target size (WCAG 2.5.8) (WordPress/gutenberg#77671) - Connectors: Replace @wordpress/ui Link and Notice usage (WordPress/gutenberg#78117) - Connectors: Increase right padding of callout for mobile layout (WordPress/gutenberg#78126) - isFulfilled: don't change resolution state, call in resolveSelect (WordPress/gutenberg#78201) - Connectors: Restyle AI plugin callout with pastel background and beaker decoration (WordPress/gutenberg#78243) - Block supports: Optimize custom CSS class rendering and parsing (WordPress/gutenberg#78217) - Block Inspector: Hide Styles tab in preview mode (WordPress/gutenberg#78230) - Navigation Link: Preserve custom labels during link updates (WordPress/gutenberg#77186) - Editor: Fix Visual Revisions meta keys overlap (WordPress/gutenberg#78156) - Editor: Disable Visual Revisions when classic meta boxes are present (WordPress/gutenberg#78249) (WordPress/gutenberg#78286) - Revisions: Scale diff markers width with user text-size preference (WordPress/gutenberg#78273) A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/c15cef1d6b07f666df28dac0383bafb0edfe0914…3a4e8d1418d25da83b70158bcaabf65580690b6b. Log created with: git log --reverse --format="- %s" c15cef1d6b07f666df28dac0383bafb0edfe0914..3a4e8d1418d25da83b70158bcaabf65580690b6b | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy See #64595. git-svn-id: https://develop.svn.wordpress.org/branches/7.0@62360 602fd350-edb4-49c9-b593-d223f7449a82
This updates the pinned hash from the `gutenberg` from `c15cef1d6b07f666df28dac0383bafb0edfe0914 ` to `3a4e8d1418d25da83b70158bcaabf65580690b6b`. The following changes are included: - [WP.7.0] Admin UI: Backport accessibility fixes (WordPress/gutenberg#77617, WordPress/gutenberg#78001) (WordPress/gutenberg#78002) - Fix: Shortcode block does not render in Navigation Overlay (WordPress/gutenberg#77511) - feat: Enhance Connectors page on read-only file system (WordPress/gutenberg#77521) - Connectors: Avoid using centered text (WordPress/gutenberg#78125) - Revisions: Add tooltip to diff marker buttons (WordPress/gutenberg#77690) - Add backport for WP_ALLOW_COLLABORATION (WordPress/gutenberg#78160) - Add aria-label to Revisions button in Post Summary sidebar (WordPress/gutenberg#78140) - Revisions diff markers: enforce 24×24px minimum target size (WCAG 2.5.8) (WordPress/gutenberg#77671) - Connectors: Replace @wordpress/ui Link and Notice usage (WordPress/gutenberg#78117) - Connectors: Increase right padding of callout for mobile layout (WordPress/gutenberg#78126) - isFulfilled: don't change resolution state, call in resolveSelect (WordPress/gutenberg#78201) - Connectors: Restyle AI plugin callout with pastel background and beaker decoration (WordPress/gutenberg#78243) - Block supports: Optimize custom CSS class rendering and parsing (WordPress/gutenberg#78217) - Block Inspector: Hide Styles tab in preview mode (WordPress/gutenberg#78230) - Navigation Link: Preserve custom labels during link updates (WordPress/gutenberg#77186) - Editor: Fix Visual Revisions meta keys overlap (WordPress/gutenberg#78156) - Editor: Disable Visual Revisions when classic meta boxes are present (WordPress/gutenberg#78249) (WordPress/gutenberg#78286) - Revisions: Scale diff markers width with user text-size preference (WordPress/gutenberg#78273) A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/c15cef1d6b07f666df28dac0383bafb0edfe0914…3a4e8d1418d25da83b70158bcaabf65580690b6b. Log created with: git log --reverse --format="- %s" c15cef1d6b07f666df28dac0383bafb0edfe0914..3a4e8d1418d25da83b70158bcaabf65580690b6b | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy See #64595. Built from https://develop.svn.wordpress.org/branches/7.0@62360 git-svn-id: http://core.svn.wordpress.org/branches/7.0@61641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This updates the pinned hash from the `gutenberg` from `c15cef1d6b07f666df28dac0383bafb0edfe0914 ` to `3a4e8d1418d25da83b70158bcaabf65580690b6b`. The following changes are included: - [WP.7.0] Admin UI: Backport accessibility fixes (WordPress/gutenberg#77617, WordPress/gutenberg#78001) (WordPress/gutenberg#78002) - Fix: Shortcode block does not render in Navigation Overlay (WordPress/gutenberg#77511) - feat: Enhance Connectors page on read-only file system (WordPress/gutenberg#77521) - Connectors: Avoid using centered text (WordPress/gutenberg#78125) - Revisions: Add tooltip to diff marker buttons (WordPress/gutenberg#77690) - Add backport for WP_ALLOW_COLLABORATION (WordPress/gutenberg#78160) - Add aria-label to Revisions button in Post Summary sidebar (WordPress/gutenberg#78140) - Revisions diff markers: enforce 24×24px minimum target size (WCAG 2.5.8) (WordPress/gutenberg#77671) - Connectors: Replace @wordpress/ui Link and Notice usage (WordPress/gutenberg#78117) - Connectors: Increase right padding of callout for mobile layout (WordPress/gutenberg#78126) - isFulfilled: don't change resolution state, call in resolveSelect (WordPress/gutenberg#78201) - Connectors: Restyle AI plugin callout with pastel background and beaker decoration (WordPress/gutenberg#78243) - Block supports: Optimize custom CSS class rendering and parsing (WordPress/gutenberg#78217) - Block Inspector: Hide Styles tab in preview mode (WordPress/gutenberg#78230) - Navigation Link: Preserve custom labels during link updates (WordPress/gutenberg#77186) - Editor: Fix Visual Revisions meta keys overlap (WordPress/gutenberg#78156) - Editor: Disable Visual Revisions when classic meta boxes are present (WordPress/gutenberg#78249) (WordPress/gutenberg#78286) - Revisions: Scale diff markers width with user text-size preference (WordPress/gutenberg#78273) A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/c15cef1d6b07f666df28dac0383bafb0edfe0914…3a4e8d1418d25da83b70158bcaabf65580690b6b. Log created with: `git log --reverse --format="- %s" c15cef1d6b07f666df28dac0383bafb0edfe0914..3a4e8d1418d25da83b70158bcaabf65580690b6b | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy` Reviewed by desrosj. Merges [62360] to `trunk`. See #64595. git-svn-id: https://develop.svn.wordpress.org/trunk@62361 602fd350-edb4-49c9-b593-d223f7449a82
This updates the pinned hash from the `gutenberg` from `c15cef1d6b07f666df28dac0383bafb0edfe0914 ` to `3a4e8d1418d25da83b70158bcaabf65580690b6b`. The following changes are included: - [WP.7.0] Admin UI: Backport accessibility fixes (WordPress/gutenberg#77617, WordPress/gutenberg#78001) (WordPress/gutenberg#78002) - Fix: Shortcode block does not render in Navigation Overlay (WordPress/gutenberg#77511) - feat: Enhance Connectors page on read-only file system (WordPress/gutenberg#77521) - Connectors: Avoid using centered text (WordPress/gutenberg#78125) - Revisions: Add tooltip to diff marker buttons (WordPress/gutenberg#77690) - Add backport for WP_ALLOW_COLLABORATION (WordPress/gutenberg#78160) - Add aria-label to Revisions button in Post Summary sidebar (WordPress/gutenberg#78140) - Revisions diff markers: enforce 24×24px minimum target size (WCAG 2.5.8) (WordPress/gutenberg#77671) - Connectors: Replace @wordpress/ui Link and Notice usage (WordPress/gutenberg#78117) - Connectors: Increase right padding of callout for mobile layout (WordPress/gutenberg#78126) - isFulfilled: don't change resolution state, call in resolveSelect (WordPress/gutenberg#78201) - Connectors: Restyle AI plugin callout with pastel background and beaker decoration (WordPress/gutenberg#78243) - Block supports: Optimize custom CSS class rendering and parsing (WordPress/gutenberg#78217) - Block Inspector: Hide Styles tab in preview mode (WordPress/gutenberg#78230) - Navigation Link: Preserve custom labels during link updates (WordPress/gutenberg#77186) - Editor: Fix Visual Revisions meta keys overlap (WordPress/gutenberg#78156) - Editor: Disable Visual Revisions when classic meta boxes are present (WordPress/gutenberg#78249) (WordPress/gutenberg#78286) - Revisions: Scale diff markers width with user text-size preference (WordPress/gutenberg#78273) A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/c15cef1d6b07f666df28dac0383bafb0edfe0914…3a4e8d1418d25da83b70158bcaabf65580690b6b. Log created with: `git log --reverse --format="- %s" c15cef1d6b07f666df28dac0383bafb0edfe0914..3a4e8d1418d25da83b70158bcaabf65580690b6b | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy` Reviewed by desrosj. Merges [62360] to `trunk`. See #64595. Built from https://develop.svn.wordpress.org/trunk@62361 git-svn-id: http://core.svn.wordpress.org/trunk@61642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
What?
Why?
Use of h1 is important for accessibility on pages where the title heading is clearly the main heading of the page. That's not the case in all site-editor pages, where the navigation sidebar includes "page heading" outside the actual
Pagecomponent.Currently, we're manually switching to h1 on "top level pages" like on Fonts and Connectors, which is when
headingLevelwas initially added.Since many of the default use cases by plugin developers and also within Gutenberg are "classic sidebar + Page", it's reasonable to default to h1 so that consumers (especially plugin developers) don't need to worry about this.
In future, I'd expect WP Build to just handle the semantics depending on what we're building, so that nobody needs to think about the right accessible heading level.
How?
Default to h1 instead of h2 in the page header.
Testing Instructions
See affected screens:
Standalone admin pages
connectors-home/wp-admin/options-general.php?page=options-connectors-wp-adminguidelines/wp-admin/options-general.php?page=guidelines-wp-admintaxonomies/wp-admin/options-general.php?page=taxonomies-wp-adminfont-list/wp-admin/themes.php?page=font-library-wp-admin&p=%2Ffont-listSite Editor
navigation-list/wp-admin/admin.php?page=site-editor-v2&p=%2Fnavigation%2Flistnavigation-edit/wp-admin/admin.php?page=site-editor-v2&p=%2Fnavigation%2Fedit%2F{id}pattern-list/wp-admin/admin.php?page=site-editor-v2&p=%2Fpatterns%2Flist%2F{type}post-list/wp-admin/admin.php?page=site-editor-v2&p=%2Ftypes%2F{type}%2Flist%2F{slug}styles/wp-admin/admin.php?page=site-editor-v2&p=%2Fstylestemplate-part-list/wp-admin/admin.php?page=site-editor-v2&p=%2Ftemplate-parts%2Flist%2F{area}Make sure to test both versions of the site editor (see Gutenberg→Experiments):

Testing Instructions for Keyboard
Screenshots or screencast
Examples of pages that should remain h1:



Examples of pages that should remain h2:
Use of AI Tools
Created by using Cursor.