Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#35174 closed defect (bug) (fixed)

Remove title attributes: the "URL" abbreviation for Universal Resource Locator

Reported by: afercia's profile afercia Owned by: afercia's profile afercia
Milestone: 4.5 Priority: normal
Severity: normal Version: 4.4
Component: Administration Keywords: has-patch, title-attribute
Focuses: ui, accessibility Cc:

Description

See related #24766 and all the following tickets about title attributes.

There are two occurrences in the WordPress codebase for "URL" that use a title attribute to expand the abbreviation, in options-permalink.php and options-writing.php.

Discussed a bit this case in the accessibility channel on Slack and probably there's no need to use title attributes in the first place, since "URL" has essentially entered language as a self-contained concept.

Attachments (2)

35174.patch (2.2 KB) - added by afercia 9 years ago.
35174.2.patch (2.2 KB) - added by afercia 9 years ago.

Download all attachments as: .zip

Change History (9)

#1 @afercia
9 years ago

  • Keywords has-patch added
  • Owner set to afercia
  • Status changed from new to assigned

The proposed patch simply removes the title attributes. Keeps the <abbr> tags for semantics and to help assistive technologies announce them correctly.

#2 @afercia
9 years ago

To clarify, this is not to say that abbreviations should never be expanded. It is still recommended to provide an expansion, preferably in plain text, but in this case "URL" probably doesn't need to be expanded. As reference, see for example:
https://www.paciellogroup.com/blog/2010/11/using-the-html-title-attribute/

Expansion of an abbreviation: The title on the abbr element is well supported by screen reader software, but its use is still problematic, as other user groups cannot access the expansion. It is recommended that the expanded form of an abbreviation is provided in plain text when it is first used in a document, and/or a glossary of terms that provides the expanded form is provided. This is not to suggest that that the expansion should not be provided using the title attribute, only that due to its limitations, an expansion in plain text should also be provided.

@afercia
9 years ago

#3 @afercia
9 years ago

Looking back at this, I'd be in favor of removing the <abbr> tags too. As far as I see even the official URL specification doesn't use <abbr>. Worth noting that in options-permalink.php there are already other occurrences of "URL" and "URLs" which not marked as abbreviations.

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

@afercia
9 years ago

#4 @afercia
9 years ago

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

In 36142:

Accessibility: Don't mark up "URL" as an abbreviation.

"URL" has essentially entered language as a self-contained concept, there's
no more need to expand it with an <abbr> element and a title attribute.

Fixes #35174.

#5 follow-up: @samuelsidler
9 years ago

Fwiw, I think we should keep the <abbr> for URL as well as for any abbreviations we use in the admin.

That said, it's "Uniform Resource Locator" not "Universal Resource Locator." I wonder how long that bug has been there. :)

#6 in reply to: ↑ 5 @afercia
9 years ago

Replying to samuelsidler:

Fwiw, I think we should keep the <abbr> for URL as well as for any abbreviations we use in the admin.

Open to suggestions :) Just noting there are several (really, a lot) of occurrences in the admin where "URL" and "URLs" are not marked up as abbreviations. The ones removed in this ticket where the only ones wrapped in a <abbr> I was able to find.

#7 @afercia
7 years ago

  • Keywords title-attribute added
Note: See TracTickets for help on using tickets.