WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#35076 closed defect (bug) (fixed)

Remove title attributes: the Featured Image postbox

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

Description

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

When a post has a featured image set, the image link has a title attribute that says "Set featured image".
If this is a relevant information, it should be shown in plain text in the interface otherwise should be just removed.

Additionally, the focus style can be improved. See screenshot:

https://cldup.com/_733TzJHXu.png

Attachments (3)

35076.patch (3.9 KB) - added by afercia 5 years ago.
35076.2.patch (2.4 KB) - added by afercia 5 years ago.
35076.3.patch (1.3 KB) - added by afercia 5 years ago.
Prints out the aria-describedby attribute conditionally

Download all attachments as: .zip

Change History (12)

@afercia
5 years ago

#1 @afercia
5 years ago

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

First pass:

  • remove the title attribute
  • fix the focus style
  • add a new post label: items_list_navigation
  • show the label in plain text in a howto paragraph, as done for example in Tags postbox

See screenshot with the patch applied:

https://cldup.com/K7TzHqKQEb.png

About the new paragraph, open to suggestions for a better wording. Any thoughts more than welcome.

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


5 years ago

#3 @SergeyBiryukov
5 years ago

I'm not sure we need a new label here.

The point of #19257 was to allow CPTs to rename "Featured image" to something else. But "Click the image to edit or update" is pretty generic and should not depend on the post type (it's still an image, after all).

We could add the label later in a separate ticket if someone makes a request for that.

#4 @afercia
5 years ago

Thanks @SergeyBiryukov, cool. So: just a string, the simpler the better.

@afercia
5 years ago

#5 @afercia
5 years ago

Refreshed patch: removes the useless new post label in favor of a plain translatable string.

#6 @afercia
5 years ago

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

In 36000:

Accessibility: Remove the title attribute from the Featured Image postbox thumbnail.

The title attribute is now replaced with plain text in a howto paragraph, as done for example in the Tags postbox.
Adds an aria-describedby attribute on the thumbnail link to target the description.
Also, fixes the focus style on the featured image thumbnail.

Fixes #35076.

#7 @afercia
5 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

When there's no featured image, the aria-describedby attribute points to a non-existing element, which is invalid code. It should be set following the conditional logic in _wp_post_thumbnail_html().

@afercia
5 years ago

Prints out the aria-describedby attribute conditionally

#8 @afercia
5 years ago

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

In 36584:

Accessibility: after [36000] conditionally print out the aria-describedby attribute on the Featured Image postbox.

Fixes #35076.

#9 @afercia
3 years ago

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