WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 3 weeks ago

#46980 closed defect (bug) (fixed)

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

Download all attachments as: .zip

Change History (25)

@chetan200891
5 months ago

Created initial patch.

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


5 months ago

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

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

#5 @audrasjb
4 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 4 months ago by audrasjb (previous) (next) (diff)

@audrasjb
4 months ago

Separate patch for readme.html

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

Current timezone description in customizer abbr title attribute

@audrasjb
4 months ago

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

#7 @audrasjb
4 months ago

  • Keywords has-screenshots added

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


4 months ago

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

<abbr>API</abbr>

#10 @afercia
4 months ago

  • Keywords 2nd-opinion removed

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


5 weeks ago

#13 @audrasjb
5 weeks ago

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

#14 @afercia
4 weeks 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
3 weeks 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
3 weeks ago

#16 @afercia
3 weeks 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 3 weeks ago by afercia (previous) (diff)

@afercia
3 weeks ago

General Settings

@afercia
3 weeks ago

Customizer: named timezone

@afercia
3 weeks ago

Customizer: UTC offset timezone

#17 @afercia
3 weeks 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.

Note: See TracTickets for help on using tickets.