WordPress.org

Make WordPress Core

Opened 3 months ago

Last modified 8 weeks ago

#46980 assigned 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:

Description

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
https://developer.paciellogroup.com/blog/2019/03/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 3 months ago.
Created initial patch.
46980-readme.diff (2.8 KB) - added by audrasjb 2 months ago.
Separate patch for readme.html
Capture d’écran 2019-05-18 à 09.42.17.png (82.5 KB) - added by audrasjb 2 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 2 months ago.
Proposal: what about having the timezone description fully displayed right after the datetime controls?

Download all attachments as: .zip

Change History (14)

@chetan200891
3 months ago

Created initial patch.

#1 @SergeyBiryukov
3 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.


3 months ago

#3 @afercia
3 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
2 months ago

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

#5 @audrasjb
2 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?

Version 1, edited 2 months ago by audrasjb (previous) (next) (diff)

@audrasjb
2 months ago

Separate patch for readme.html

#6 @audrasjb
2 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.

@audrasjb
2 months ago

Current timezone description in customizer abbr title attribute

@audrasjb
2 months ago

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

#7 @audrasjb
2 months ago

  • Keywords has-screenshots added

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


2 months ago

#9 @afercia
8 weeks 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:

<abbr>API</abbr>

#10 @afercia
8 weeks ago

  • Keywords 2nd-opinion removed
Note: See TracTickets for help on using tickets.