Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#26549 closed defect (bug) (wontfix)

Remove title attributes: media.php

Reported by: joedolson's profile joedolson Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch, 2nd-opinion, close, title-attribute
Focuses: accessibility Cc:

Description (last modified by SergeyBiryukov)

Related: #24766

// media.php
get_image_tag()

Attachments (1)

26549.patch (1.0 KB) - added by joedolson 10 years ago.
Remove title attribute patch for wp-includes/media.php

Download all attachments as: .zip

Change History (9)

#1 @SergeyBiryukov
10 years ago

  • Description modified (diff)

@joedolson
10 years ago

Remove title attribute patch for wp-includes/media.php

#2 @joedolson
10 years ago

The only call to get_image_tag is in get_image_send_to_editor, which submits a blank string for the title attribute. Therefore, in get_image_tag, $title will never receive a value.

A title can still be added via the image_send_to_editor filter, but get_image_tag will still be irrelevant. Therefore, unless I'm missing something, it's totally reasonable to remove all references to $title in get_image_tag, adding documentation to the effect that it's been deprecated.

This is a simple patch, but it may be feasible to remove the attribute from the function arguments, as long as $title is declared and passed to the filter.

#3 @joedolson
10 years ago

  • Keywords has-patch added

#4 @joedolson
10 years ago

  • Keywords 2nd-opinion added

#5 @nacin
10 years ago

  • Component changed from Accessibility to Media
  • Focuses accessibility added
  • Keywords close added

get_image_tag() almost had $title removed during the great Media Image Title Massacre of 3.5 (#18984). However, I realized it could easily be construed to be a utility function and that others may be using it with a tooltip. I think it's best to leave this one alone.

#6 @joedolson
10 years ago

Given that it is only likely to be used if somebody has specifically gone out of their way to implement it, it's probably fine to leave alone, as you say. Cheerio.

#7 @nacin
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

#8 @afercia
7 years ago

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