Make WordPress Core

Opened 4 months ago

Last modified 2 days ago

#46980 reopened defect (bug)

Remove title attributes from all the abbreviations

Reported by: afercia Owned by: audrasjb
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: Administration Keywords: title-attribute has-patch needs-refresh has-screenshots
Focuses: accessibility Cc:


In the last releases, WordPress has been progressively removing many title attributes used in the admin screens for the reasons outlined in #24766.

The accessibility team recommendation for title attributes can be summarized as follows: don't rely on title attributes for relevant information. If the information is relevant, consider to put it in plain, visible, text on the page. If it's not relevant, consider to remove it.

Contrary to the common belief, a title attribute on an <abbr> is available only to a minority of users. Thus, it defeats the purpose to "expand" the abbreviation, as many users won't have access to the expanded terms.

Interesting reading from a high-level source:

Short note: The abbreviation appreciation society

I'd like to propose to follow the best practice suggested there and:

  • evaluate which abbreviations can be removed in favor of full text
  • for the other cases: provide an expansion of the abbreviation/acronym/neuronym in plain text on first use
  • use an <abbr> to mark up the abbreviation (which provides a hint to user agents on how to announce/display the content)
  • make a patch for all the <abbr> occurrences in core
  • make a separate patch for the bundled themes

Attachments (4)

46980.diff (2.6 KB) - added by chetan200891 4 months ago.
Created initial patch.
46980-readme.diff (2.8 KB) - added by audrasjb 3 months ago.
Separate patch for readme.html
Capture d’écran 2019-05-18 à 09.42.17.png (82.5 KB) - added by audrasjb 3 months ago.
Current timezone description in customizer abbr title attribute
Capture d’écran 2019-05-18 à 09.46.49.png (66.9 KB) - added by audrasjb 3 months ago.
Proposal: what about having the timezone description fully displayed right after the datetime controls?

Download all attachments as: .zip

Change History (18)

4 months ago

Created initial patch.

#1 @SergeyBiryukov
4 months ago

Just noticed that readme.html also has some <abbr> tags and links with the title attribute:

  • <a href="https://wordpress.org/support/forums/" title="WordPress support">support forums</a>
  • <a href="wp-admin/import.php" title="Import to WordPress">our import tools</a>
  • <abbr title="Internet Relay Chat">IRC</abbr>
  • <abbr title="application programming interface">API</abbr>
  • <a href="https://wordpress.org/donate/" title="Donate to WordPress">donating</a>
  • <abbr title="GNU General Public License">GPL</abbr>

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.

4 months ago

#3 @afercia
4 months ago

  • Keywords has-patch needs-refresh added
  • Milestone changed from Awaiting Review to 5.3

Discussed during today's accessibility bug scrub and agreed to milestone for next 5.3 release.

#4 @audrasjb
4 months ago

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

#5 @audrasjb
3 months ago

  • Keywords 2nd-opinion added

@chetan200891 I'm wondering about the change made on the file src/wp-admin/includes/class-wp-posts-list-table.php in 46980.diff. I don't think we still need an abbr tag here since the date is not an abbreviation in itself. Also, the excerpt and list modes are pretty the same now with that patch.

I think it's worth changing the "list" mode behavior to display the full datetime. Should we change that in class-wp-posts-list-table.php or in the post_date_column_time filter? Any thoughts @SergeyBiryukov?

Last edited 3 months ago by audrasjb (previous) (diff)

3 months ago

Separate patch for readme.html

#6 @audrasjb
3 months ago

I'm also wondering about the change proposed in class-wp-customize-date-time-control.php.
If we remove the title attribute information, then there is few unused things to also remove in get_timezone_info() function.
$timezone_info['description'] string is not used anymore. We also loose some useful information about the current timezone in my opinion.

3 months ago

Current timezone description in customizer abbr title attribute

3 months ago

Proposal: what about having the timezone description fully displayed right after the datetime controls?

#7 @audrasjb
3 months ago

  • Keywords has-screenshots added

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.

3 months ago

#9 @afercia
3 months ago

The patches need to be updated to follow the recommended pattern. Trying to summarize the recommendations from the Paciello Group linked above.

  • first: evaluate which abbreviations can be removed in favor of full text i.e. remove the <abbr> and use expanded text
  • then: for the<abbr> that can't be removed, use the recommended pattern, for example: <abbr>FWIW</abbr> (For what it's worth)
  • abbreviations in the bundled themes should preferably go in a separate patch attached to this ticket

In no case the <abbr> tag should be kept without an accompanying expanded text. For example the following pattern doesn't help users:


#10 @afercia
3 months ago

  • Keywords 2nd-opinion removed

#11 @afercia
3 weeks ago

In 45728:

Accessibility: Remove title attributes from the Meta widget.

  • removes the Powered by WordPress, state-of-the-art semantic personal publishing platform. title attribute
  • removes the title attribute from the abbreviations: contrary to a common belief, title attributes on abbreviations are only available to a minority of users, see https://developer.paciellogroup.com/blog/2019/03/short-note-the-abbreviation-appreciation-society/
  • changes the term RSS to feed, as RSS is a technical term not all users are supposed to be familiar with
  • improves the widget_meta_poweredby filter documentation

Props nishitlangaliya, chetan200891, audrasjb.
See #46980, #24766.
Fixes #46978.

This ticket was mentioned in Slack in #accessibility by audrasjb. View the logs.

9 days ago

#13 @audrasjb
9 days ago

  • Resolution set to fixed
  • Status changed from assigned to closed

#14 @afercia
2 days ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Worth noting [45728] addressed only the Meta widget. There are still other <abbr> elements in core that need some a11y love. Reopening :)

Note: See TracTickets for help on using tickets.