Make WordPress Core

#57199 closed defect (bug) (fixed)

Bundled themes: Remove title attributes

Reported by: sabernhardt's profile sabernhardt Owned by: audrasjb's profile audrasjb
Milestone: 6.2 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch
Focuses: accessibility Cc:

Description

Related: #24766 and #24203

Searching bundled themes for title= returned 59 results.

Redundant (13):

  • "Skip to content" in Twenty Ten, Twenty Twelve and Twenty Thirteen (not Twenty Eleven since r27569)
  • Site name in Twenty Ten (header and footer), Twenty Twelve and Twenty Thirteen
  • Author name in the H1 heading of the author.php template in the four themes from Twenty Ten to Twenty Thirteen
  • Date and time in the comment timestamp links of Twenty Nineteen and Twenty Twenty

Empty link with title attribute:

  • Twenty Eleven's Showcase template has empty links to each featured post slide with "Featuring: [post title]" as a title attribute. The attribute can stay if it's silenced, but the links need accessible text.

Other title attributes to consider removing:

title text link/element text locations
"Go to [parent post title]" [parent post title] Twenty Eleven image template,
Twenty Twelve image template,
Twenty Thirteen image template
"Go to [parent post title]" "← [parent post title]" Twenty Ten loop-attachment.php, line 29
[attachment post title] [image's alternative text] Twenty Ten loop-attachment.php, line 123,
Twenty Eleven image.php, line 93,
Twenty Twelve image.php, line 93,
Twenty Thirteen functions.php, line 652
[attachment post title] [non-image filename slug] Twenty Ten loop-attachment.php, line 151
"Link to full-size image" [image dimensions] Twenty Ten loop-attachment.php, line 74,
Twenty Eleven image.php, line 35,
Twenty Twelve image.php, line 31
"Link to full-size image" "Full resolution ([width] × [height])" Twenty Thirteen image.php, line 48
"View Galleries" "More Galleries" Twenty Ten Gallery type archive link
"View posts in the Gallery category" "More Galleries" Twenty Ten Gallery category archive link
"Permalink to [post title]" "[number of] image(s)" Twenty Ten loop.php, line 92
"Permalink to [post title]" "[number of] photo(s)" Twenty Eleven content-gallery.php, line 52
"Permalink to [post title]" [alternative text for featured image of post] Twenty Eleven showcase template
"Permalink to [post title]" "permalink" Twenty Ten functions.php (line 637, line 640 and line 643);
Twenty Eleven content-featured line 39 and line 42;
Twenty Eleven content-single line 42, line 45 and line 48
"Permalink to [post title]" [date] Twenty Twelve's content-aside, content-link, content-quote and content-status templates;
Twenty Thirteen functions.php
"Semantic Personal Publishing Platform" "Proudly powered by WordPress" Twenty Ten footer,
Twenty Eleven footer,
Twenty Twelve footer
[time] [date] Links in functions files:
Twenty Ten (line 609),
Twenty Eleven (line 801),
Twenty Twelve (line 524);
abbr elements:
Twenty Ten loop-attachment.php, line 62,
Twenty Eleven image.php, line 35
"View all posts by [author name]" [author name] Twenty Ten functions.php, line 615,
Twenty Ten loop-attachment.php, line 47,
Twenty Eleven content-image.php, line 45,
Twenty Eleven functions.php, line 801,
Twenty Twelve functions.php, line 532,
Twenty Thirteen functions.php, line 547

Change History (15)

#1 follow-up: @audrasjb
20 months ago

Great initiative!

Concerning empty links with title attribute, shouldn't we replace the title attribute with a screen reader text (visually hidden text) instead?

This ticket was mentioned in PR #3681 on WordPress/wordpress-develop by @sabernhardt.


20 months ago
#2

  • Keywords has-patch added

This starts with the obvious problems:

  1. Removes 13 redundant title attributes.
  2. Adds accessible text to the Showcase template links. The title attribute remains, silenced with aria-hidden, with a style change so it still covers the full link area.

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

#3 in reply to: ↑ 1 @audrasjb
20 months ago

Replying to audrasjb:

Concerning empty links with title attribute, shouldn't we replace the title attribute with a screen reader text (visually hidden text) instead?

Ok I just saw the implementation proposed for twentyeleven/showcase.php. It looks good to me.

#4 @mukesh27
20 months ago

  • Keywords commit added

The PR got enough approvals. Added commit keyword.

#5 @audrasjb
20 months ago

  • Owner set to audrasjb
  • Status changed from new to reviewing

#6 @audrasjb
20 months ago

In 54884:

Twenty Eleven: Remove useless title attributes.

This changeset removes title attributes from various links, as they are adding redundant information.

Props sabernhardt.
See #57199, #24766, #24203.

#7 @audrasjb
20 months ago

This changeset looks good to me and doesn't break anything in the related themes.
I'm going to commit it theme by theme, just in case.

#8 @audrasjb
20 months ago

In 54885:

Twenty Nineteen: Remove useless title attributes.

This changeset removes title attributes from links, as they are adding redundant information.

Props sabernhardt.
See #57199, #24766, #24203.

#9 @sabernhardt
20 months ago

Added costdev and mukesh27 to props on [54884] and [54885].

#10 @audrasjb
20 months ago

In 54922:

Twenty Ten: Remove unwanted title attributes.

This changeset removes title attributes from various links, as they add redundant information.

Follow-up to [53844].

Props sabernhardt, costdev, mukesh27.
See #57199, #24766, #24203.

#11 @audrasjb
20 months ago

In 54923:

Twenty Thirteen: Remove unwanted title attributes.

This changeset removes title attributes from various links, as they add redundant information.

Follow-up to [53844].

Props sabernhardt, costdev, mukesh27.
See #57199, #24766, #24203.

#12 @audrasjb
20 months ago

In 54924:

Twenty Twelve: Remove unwanted title attributes.

This changeset removes title attributes from various links, as they add redundant information.

Follow-up to [53844].

Props sabernhardt, costdev, mukesh27.
See #57199, #24766, #24203.

#13 @audrasjb
20 months ago

In 54925:

Twenty Twenty: Remove unwanted title attributes.

This changeset removes title attributes from various links, as they add redundant information.

Follow-up to [53844].

Props sabernhardt, costdev, mukesh27.
See #57199, #24766, #24203.

@audrasjb commented on PR #3681:


20 months ago
#14

PR fully committed, see the related ticket.

#15 @audrasjb
20 months ago

  • Keywords commit removed
  • Resolution set to fixed
  • Status changed from reviewing to closed

Thanks @sabernhardt for taking care of all these changes. PR fully committed, closing the ticket as fixed :)

Note: See TracTickets for help on using tickets.