Opened 4 weeks ago
Last modified 13 days ago
#62835 accepted defect (bug)
Remove title attributes from author link functions
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Users | Keywords: | title-attribute has-patch has-unit-tests |
Focuses: | accessibility | Cc: |
Description
#26559 retained some title attributes because the "Posts by author" and "Visit author's website" tooltips still had a small additional value for anyone who could access them. (The important information was already in the visible link text.)
Discussion on #24766 started to reconsider either removing the title
attributes or changing them.
@audrasjb:
Shouldn't we just replace the
title
attribute witharia-label
?
@joedolson:
This should also consider a text order change. For screen reader users, the unique information should go first: 'website: author', 'posts: author'; but for voice command, the visible information should go first: 'author: website', 'author: posts'.
@alh0319 suggested removing the attributes in a spreadsheet, and @adnanlimdi had made a patch like that.
More than 70 themes in the directory use at least two of the three functions. The output might require some distinction between the author's website link (get_the_author_link()
) and the author's post archives page (get_the_author_posts_link()
and wp_list_authors()
).
Alternatively, functions could add a parameter that defaults to the current title
but allows removing it.
Change History (8)
This ticket was mentioned in PR #8156 on WordPress/wordpress-develop by @sabernhardt.
4 weeks ago
#1
- Keywords has-patch has-unit-tests added
#2
@
4 weeks ago
I still think that we need to be able to differentiate between the two different links; otherwise we're making an existing accessibility issue worse, by having links to two different resources with the same text.
This ticket was mentioned in PR #8182 on WordPress/wordpress-develop by @sabernhardt.
4 weeks ago
#3
Option 2:
- Removes 'Posts by %s'
title
attributes fromget_the_author_posts_link()
,the_author_posts_link()
andwp_list_authors()
. - Creates a new
$use_title_attr
parameter for website links inget_the_author_link()
andthe_author_link()
.
By default, this would keep a distinction between links from get_the_author_link()
functions and the post archive links, if they are on the same page.
Like option 1, it would also remove Core's 'Posts by %s'
string, which at least 18 plugins and one recently unlisted theme have used.
This ticket was mentioned in PR #8183 on WordPress/wordpress-develop by @sabernhardt.
4 weeks ago
#4
Option 3:
Creates a new $use_title_attr
argument for each of the author link functions.
By default, this should not change the output of these functions.
@sabernhardt commented on PR #8183:
4 weeks ago
#5
The function the_author_posts_link()
deprecated an `$idmode` parameter. If that parameter needs to remain deprecated and unused, I could undo the changes to that function in this PR. Then anyone who wants to remove the title
attribute would use
echo get_the_author_posts_link( false );
Option 1: Remove
title
attributes, and update unit tests.Props adnanlimdi
Trac 62835