Skip to content

Networks and Sites: Improve accessibility of network admin pages. - #13819

Closed
guzel wants to merge 2 commits into
WordPress:trunkfrom
guzel:fix/66205-network-admin-accessibility
Closed

guzel wants to merge 2 commits into
WordPress:trunkfrom
guzel:fix/66205-network-admin-accessibility

Conversation

@guzel

@guzel guzel commented Sep 29, 2026 •

Copy link
Copy Markdown

Trac ticket: https://core.trac.wordpress.org/ticket/66205

Summary

Minor accessibility fixes on the network admin screens, as described in the ticket and follow-up review.

Network Setup (network.php)
The "Network Title" and "Network Admin Email" fields have description text that isn't programmatically associated with the inputs. This adds an aria-describedby on each input, pointing at an id on its description paragraph (sitename-desc and email-desc), matching the pattern used elsewhere in wp-admin.

The page's h1 is also followed by h3 section headings in both Network Setup steps. The "Addresses of Sites in your Network", "Server Address", "Network Details", and "Enabling the Network" headings are now h2 so the hierarchy doesn't skip a level.

My Sites (my-sites.php)
The page's h1 is followed by h3 headings, which skips a level. The per-site heading and the conditional "Global Settings" heading are now h2. The ticket asks for the CSS to be adjusted so the font size doesn't change, but h2 and h3 share the same rule in common.css (font-size: 1.3em; margin: 1em 0), so no CSS change is needed. Nothing else in the admin stylesheets targets .my-sites h3.

Testing

Tested locally with the wordpress-develop Docker environment.

Network Setup

  1. Add define( 'WP_ALLOW_MULTISITE', true ); to wp-config.php. Don't do this on a production site.
  2. Go to Tools > Network Setup.
  3. Inspect the "Network Title" and "Network Admin Email" inputs. Each has an aria-describedby that matches the id of its description.
  4. Check the heading order in the initial setup step and the configuration step: h1, then h2 section headings, with no skipped levels.
  5. Compare the computed styles of an h2 and an h3 in the same container. Font size, margin, weight and colour are identical, so there's no visual change.

My Sites

  1. After creating a test network, go to wp-admin/my-sites.php.
  2. Check the heading order: h1, then h2 for each site, with no skipped levels.
  3. To check the conditional "Global Settings" heading, hook the myblogs_options filter and return some HTML when the context is global. It renders as an h2.
  4. Compare the computed styles of an h2 and an h3 in the same container. Font size, margin, weight and colour are identical, so there's no visual change.

phpcs passes on both files. No tests were added, as these are markup-only changes and no existing tests cover these screens.

On the Network Setup screen, associate the "Network Title" and "Network Admin Email" descriptions with their inputs via `aria-describedby`.

On the My Sites screen, change the site and "Global Settings" headings from `h3` to `h2` so the heading hierarchy doesn't skip a level. `h2` and `h3` share the same admin styles, so there is no visual change.

See #66205.
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

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 props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props mitgiselle, johnjamesjacoby, afercia.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@afercia afercia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @guzel. Everything looks good to me.

Change the section headings from h3 to h2 so they follow the page h1 without skipping a level. The elements share the same admin styles, so this has no visual impact.

See #66205.
@JJJ
JJJ force-pushed the fix/66205-network-admin-accessibility branch from 3c93126 to c972a00 Compare September 30, 2026 00:29
@JJJ

JJJ commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

I added a follow-up commit for the additional heading-level issue found on the Network Setup page.

The four section headings rendered across the two setup steps—“Addresses of Sites in your Network,” “Server Address,” “Network Details,” and “Enabling the Network”—now use h2 rather than h3. This corrects the hierarchy beneath the page's h1 without changing the visual presentation, because the admin styles apply the same typography and spacing to these h2 and h3 elements.

I also ran the focused PHP coding standards check for src/wp-admin/includes/network.php, which passes.

wporg-sync pushed a commit that referenced this pull request Sep 30, 2026
Improves the accessibility of two network/multisite related admin screens:

* My sites: Converts site name and "Global Settings" (available via filter) headings to `h2` to avoid skipping a heading level
* Network setup:
  - associates fields with their descriptive text with `aria-describedby` attributes
  - converts section headings to `h2` to avoid skipping a heading level

Developed in #13819

Props mitgiselle, johnjamesjacoby, afercia.
Fixes #66205.




git-svn-id: https://develop.svn.wordpress.org/trunk@64013 602fd350-edb4-49c9-b593-d223f7449a82
@github-actions

Copy link
Copy Markdown

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 64013
GitHub commit: b24d8fb

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

@github-actions github-actions Bot closed this Sep 30, 2026
wporg-sync pushed a commit to WordPress/WordPress that referenced this pull request Sep 30, 2026
Improves the accessibility of two network/multisite related admin screens:

* My sites: Converts site name and "Global Settings" (available via filter) headings to `h2` to avoid skipping a heading level
* Network setup:
  - associates fields with their descriptive text with `aria-describedby` attributes
  - converts section headings to `h2` to avoid skipping a heading level

Developed in WordPress/wordpress-develop#13819

Props mitgiselle, johnjamesjacoby, afercia.
Fixes #66205.



Built from https://develop.svn.wordpress.org/trunk@64013


git-svn-id: http://core.svn.wordpress.org/trunk@63173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants