#42537 closed defect (bug) (fixed)
Remove title attributes: wp-login.php
Reported by: | SergeyBiryukov | Owned by: | afercia |
---|---|---|---|
Milestone: | 5.2 | Priority: | normal |
Severity: | normal | Version: | 4.9 |
Component: | Login and Registration | Keywords: | has-patch title-attribute has-dev-note |
Focuses: | accessibility, multisite | Cc: |
Description
Background: #34625
On Multisite, the title
attribute in login_header()
is different from the link text and has some meaning.
<a href="http://ms.wordpress.dev/" title="Network Title" tabindex="-1">Site Title</a>
On single site, however, the title
attribute just duplicates the link text and is redundant:
<a href="http://wordpress.dev/" title="Powered by WordPress" tabindex="-1">Powered by WordPress</a>
Most of the title
attributes are already removed from core via #24766 and related tickets. We should consider removing this one as well, either completely or only if it duplicates the link text.
The login_headertitle
filter could either be deprecated or repurposed to filter the link text instead.
Attachments (3)
Change History (28)
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
7 years ago
This ticket was mentioned in Slack in #accessibility by rianrietveld. View the logs.
6 years ago
#6
@
6 years ago
- Milestone changed from 5.0 to 4.9.9
Discussed during today's accessibility bug-scrub an agreed we'd like to propose this for 4.9.9 consideration.
#11
@
6 years ago
- Milestone changed from 5.0.3 to 5.1
Looks like the login_headertitle
should be deprecated as well. I guess any reference to $login_header_title
can be removed as well to simplify the code.
#12
@
6 years ago
- Keywords commit removed
- Milestone changed from 5.1 to 5.2
The 5.1 release beta 1 is today, the patch probably needs a refresh and deprecation of filters needs to happen early in a release cycle. Punting to 5.2.
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
6 years ago
#15
@
6 years ago
Looking a bit more into this, seems to me the current behavior on multisite is wrong.
Markup on the main network site:
<a href="http://wpmultisite.test/" title="My network title">Main site title</a>
- the URL points to the Network home
- the title attribute is the Network name (
site_name
) - the text is the main site name (
blogname
), so it can be different from the title attribute and potentially confusing
Markup on one of the network sites:
<a href="http://wpmultisite.test/" title="My network title">Site 1 title</a>
- the URL still points to the Network home
- the title attribute is still the Network name (
site_name
) - however, the text is the site name, which is inconsistent with the URL and title attribute
One more reason to simplify and remove the title attribute.
The link text should also match the URL and always be the name of the main site. Or, the URL should change and match the link text. This basically needs an answer to the question: where the WordPress logo should link to?
Worth also considering that, by default, the WordPress logo is displayed in all the three possible cases:
- single site
- network main site
- network sites
Why the WordPress logo should be used to link to the network in the first place? I'd rather consider to drastically simplify and make it always link by default to https://wordpress.org/
. Thus, there wouldn't be any ambiguity or potential confusion: it's the WordPress logo: it links to https://wordpress.org/
. Simple, clear.
The filters would still allow to change everything, if desired: logo, URL, and link text.
/Cc @jeremyfelt
This ticket was mentioned in Slack in #core-multisite by afercia. View the logs.
6 years ago
This ticket was mentioned in Slack in #core by afercia. View the logs.
6 years ago
#19
@
6 years ago
42537.3.diff simplifies everything as described above:
- deprecates
login_headertitle
- introduces a new filter
login_headertext
- removes the title attribute
- makes the URL and link text always the same on single site and multisite
- for backwards compatibility, if a
login_headertitle
is set, that will be used as link text
Not sure about the unset
added in [19783], I guess it can be removed?
#21
@
6 years ago
@SergeyBiryukov when you have a chance, I'd greatly appreciate your review especially on the filters part :)
Created patch to remove title attribute.