[wp-trac] [WordPress Trac] #51786: Accessibility issue with the logo on the login page

WordPress Trac noreply at wordpress.org
Fri Sep 27 23:43:07 UTC 2024


#51786: Accessibility issue with the logo on the login page
------------------------------------+----------------------------
 Reporter:  roytanck                |       Owner:  joedolson
     Type:  enhancement             |      Status:  accepted
 Priority:  normal                  |   Milestone:  6.7
Component:  Login and Registration  |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch               |     Focuses:  accessibility
------------------------------------+----------------------------

Comment (by joedolson):

 Thanks for the patch @pamprn!

 I've created a new version adapted from yours. The new PR contains the
 following differences:

 1) Removed `role="main"`. WordPress no longer adds these fallback
 alternatives, as they are almost never needed anymore.

 2) Change the `div` that replaced the logo `h1` with `role="presentation"`
 on the H1. On reviewing, I note that there are well over 300 plugins that
 reference the specific pattern `#login h1`. That makes changing this
 element too risky to be a good idea. However, we can change it to a
 presentational element so that the semantics are removed. I left the CSS
 changes pointing to the `.logo` class, however, as that allows us to write
 a dev note to encourage people to update their CSS and JS references so
 that we can remove this in the future.

 3) Add `h1` headings in the other views: lost password, reset password,
 and register. The confirm admin email password already had one.

 4) Added `.screen-reader-text` to the headings. While a visible heading is
 nice, practically speaking these forms are pretty clear cut. They are
 single-purpose pages, with an appropriate `title` element, and clearly
 labeled input fields. The visible heading, to me, creates more labor in
 updating screenshots than any benefit from a visible heading.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51786#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list