Make WordPress Core

Opened 3 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#62834 closed defect (bug) (fixed)

Consider removing title attributes from theme list tables

Reported by: sabernhardt's profile sabernhardt Owned by: audrasjb's profile audrasjb
Milestone: 6.8 Priority: low
Severity: minor Version:
Component: Themes Keywords: title-attribute has-patch
Focuses: accessibility, administration Cc:

Description

Related: #24766

The old list tables for themes and theme installation include title attributes:

  • 'This theme is already installed and is up to date' on 'Installed' spans
  • 'Update to version %s' on 'Update' links
  • 'Install %s' on an 'Install Now' link
  • 'Preview %s' on a 'Preview' link
  • 'Preview “%s”' on a screenshot thumbnail image (linked with empty alt)
  • 'Activate “%s”'on an 'Activate' link

If sites can still access these list tables, the attributes could be worth removing and/or replacing.

@alh0319 suggested replacing the title with aria-label for the thumbnail image link, but removing the other title attributes.

Change History (5)

This ticket was mentioned in PR #8155 on WordPress/wordpress-develop by @sabernhardt.


3 weeks ago
#1

  • Keywords has-patch added
  • Removes title attributes from span elements.
  • Replaces title with aria-label for links whose visible text starts with the same word (in English). This is similar to links on the Add Plugins screen.
  • Reuses the $preview_title variable to keep ARIA labels consistent for both Preview links.

Trac 62834

#2 @audrasjb
3 weeks ago

  • Milestone changed from Awaiting Review to 6.8
  • Owner set to audrasjb
  • Status changed from new to accepted

Hi @sabernhardt and @alh0319 and thanks for the ticket/PR.

I'm always hesitant about using aria-label attributes but in this case:

  • first it allows us to keep the complete information previously provided by the title attribute
  • it is only adding more information to the displayed string
  • it doesn't change any translation string and keep the interface consistent without having to change the stylesheet of these old screens

Thus, I'm gonna move this ticket to milestone 6.8.

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


3 weeks ago

#4 @audrasjb
3 weeks ago

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

In 59675:

Themes: Remove title attributes from theme list tables.

This changeset updates the old list tables for themes and theme installation to remove title attributes or replace them with a more acessible implementation:

  • Removes title attributes from span elements
  • Replaces title with aria-label for links whose visible text starts with the same word, consistently with links on the "Add Plugins" screen
  • Reuses the $preview_title variable to keep ARIA labels consistent for both Preview links

Follow-up to [22439], [27548], [31513], [32991], [50804], [53414].

Props karlgroves, sabernhardt, audrasjb, alh0319.
Fixes #62834.
See #24766.

Note: See TracTickets for help on using tickets.