Skip to content

Fixed/two h1 issue loginscreen - #14292

Open
shahjehan-wpbrigade wants to merge 8 commits into
WordPress:trunkfrom
shahjehan-wpbrigade:fixed/two-h1-issue-loginscreen
Open

shahjehan-wpbrigade wants to merge 8 commits into
WordPress:trunkfrom
shahjehan-wpbrigade:fixed/two-h1-issue-loginscreen

Conversation

@shahjehan-wpbrigade

Copy link
Copy Markdown

Trac ticket:

Use of AI Tools


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@github-actions

github-actions Bot commented Oct 15, 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.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @shahjehan-wpbrigade.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

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

Props mukesh27.

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

@shahjehan-wpbrigade

Copy link
Copy Markdown
Author

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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.

Comment thread src/wp-login.php Outdated
?>
<div id="login">
<h1 role="presentation" class="wp-login-logo"><a href="<?php echo esc_url( $login_header_url ); ?>"><?php echo $login_header_text; ?></a></h1>
<div role="presentation" class="wp-login-logo"><a href="<?php echo esc_url( $login_header_url ); ?>"><?php echo $login_header_text; ?></a></div>

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.

I personally don't like this approach. Instead updating it here better to update the accessibility h1.

@shahjehan-wpbrigade shahjehan-wpbrigade Oct 15, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@mukeshpanchal27 We can change this to a logo for an H2. Need your thoughts?

@shahjehan-wpbrigade shahjehan-wpbrigade Oct 16, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for the feedback, @mukeshpanchal27!

I’ve updated the approach to fix the semantic duplicate <h1> issue without entirely removing the heading element. Instead of hardcoding a <div>, the code now dynamically checks if a title heading is present (such as on the email confirmation screen) and sets the logo tag accordingly:

When another primary <h1> heading exists, the logo wrapper correctly falls back to an <h2> with role="presentation".

When no competing <h1> exists, the logo wrapper retains its semantic <h1> status.

Let me know if this approach looks better or if any further adjustments are needed!

@mukeshpanchal27

Copy link
Copy Markdown
Member

Introduce in r59138 / Core-51786

cc. @joedolson

setup-php only warns when a tool fails to install, which left `wp` missing
and failed the "Download WordPress" step with exit code 127. Install the
official WP-CLI phar when it is not already available.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shahjehan-wpbrigade and others added 3 commits October 16, 2026 11:22
…exists.

Output the login logo as a presentational h2 when the screen-reader page
title h1 is printed, or when the admin email confirmation form provides
its own h1. Otherwise, the logo becomes the page's h1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-wpbrigade/wordpress-develop into fixed/two-h1-issue-loginscreen
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.

2 participants