#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)
Change History (26)
#1
@
5 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.
5 years ago
#3
@
5 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.
#5
@
5 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?
#6
@
5 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.
@
5 years ago
Proposal: what about having the timezone description fully displayed right after the datetime controls?
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
5 years ago
#9
@
5 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>
This ticket was mentioned in Slack in #accessibility by audrasjb. View the logs.
5 years ago
#14
@
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
@
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.
#16
@
5 years ago
readme.html
: improves abbreviations and removes unnecessarytitle
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 anabbr
element because this is not an abbreviation - (grunt precommit cleaned up some CSS vendor prefixed properties)
See screenshots below.
Created initial patch.