Make WordPress Core

Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#46980 closed defect (bug) (fixed)

Remove title attributes from all the abbreviations

Reported by: afercia's profile afercia Owned by: audrasjb's profile audrasjb
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: Administration Keywords: title-attribute has-screenshots needs-patch
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 (8)

46980.diff (2.6 KB) - added by chetan200891 6 years ago.
Created initial patch.
46980-readme.diff (2.8 KB) - added by audrasjb 6 years ago.
Separate patch for readme.html
Capture d’écran 2019-05-18 à 09.42.17.png (82.5 KB) - added by audrasjb 6 years 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 6 years ago.
Proposal: what about having the timezone description fully displayed right after the datetime controls?
46980.2.diff (12.1 KB) - added by afercia 5 years ago.
46980 01.png (82.3 KB) - added by afercia 5 years ago.
General Settings
46980 02.png (42.8 KB) - added by afercia 5 years ago.
Customizer: named timezone
46980 03.png (35.0 KB) - added by afercia 5 years ago.
Customizer: UTC offset timezone

Download all attachments as: .zip

Change History (26)

@chetan200891
6 years ago

Created initial patch.

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


6 years ago

#3 @afercia
6 years 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
6 years ago

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

#5 @audrasjb
6 years 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 6 years ago by audrasjb (previous) (diff)

@audrasjb
6 years ago

Separate patch for readme.html

#6 @audrasjb
6 years 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
6 years ago

Current timezone description in customizer abbr title attribute

@audrasjb
6 years ago

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

#7 @audrasjb
6 years ago

  • Keywords has-screenshots added

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


6 years ago

#9 @afercia
6 years 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
6 years ago

  • Keywords 2nd-opinion removed

#11 @afercia
5 years 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.


5 years ago

#13 @audrasjb
5 years ago

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

#14 @afercia
5 years 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 :)

#15 @afercia
5 years ago

  • Keywords needs-patch added; has-patch needs-refresh removed

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

Yes the timezone abbreviation in the Customizer needs to be changed. Currently, it uses an aria-label attribute that overrides any other information. This:

<abbr ... aria-label="Timezone" title="Timezone is Europe/Rome (CEST), currently UTC+2." ...

is announced just as "Timezone": the information in the title attribute is ignored and there's no other info available.

@afercia
5 years ago

#16 @afercia
5 years ago

46980.2.diff:

  • readme.html: improves abbreviations and removes unnecessary title attributes
  • options-general: removes unnecessary UTC abbreviations and improves the remaining ones
  • customizer schedule changeset date: removes unnecessary UTC abbreviations and improves the remaining ones
  • posts table date: uses a span element instead of an abbr element because this is not an abbreviation
  • (grunt precommit cleaned up some CSS vendor prefixed properties)

See screenshots below.

Last edited 5 years ago by afercia (previous) (diff)

@afercia
5 years ago

General Settings

@afercia
5 years ago

Customizer: named timezone

@afercia
5 years ago

Customizer: UTC offset timezone

#17 @afercia
5 years ago

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

In 45930:

Accessibility: Audit usage of abbreviations.

Title attributes on abbreviations are only available to a minority of users. The
best option is to avoid unnecessary abbreviations when possible. In the other cases,
use an <abbr> element (which provides a hint to user agents on how to announce
and display the abbreviation) and provide an expansion in plain text on first use.

  • readme.html: improves abbreviations and removes unnecessary title attributes
  • options-general: removes unnecessary abbreviations and improves the remaining ones
  • customizer schedule changeset date: removes unnecessary abbreviations and improves the remaining ones
  • posts table date: uses a span element instead of an abbr element because this is not an abbreviation

Fixes #46980.

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


5 years ago

Note: See TracTickets for help on using tickets.