WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #18984, comment 12


Ignore:
Timestamp:
02/10/2012 04:04:54 AM (10 years ago)
Author:
ericlewis
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #18984, comment 12

    initial v1  
    44IMHO a lot of end users would be confused at the existence of a checkbox "display title of image in HTML element on site," or however it ended up being phrased.
    55
    6 It sounds like the title attribute should not exist if the alt is an empty string. Perhaps a conditional editing of attributes can be employed as such:
     6Replying to [comment:3 MarcoZ]:
     7> Using alt is indeed THE method to accessibly name images for screen readers and other assistive technologies. the title attribute is ALWAYS suplemental information that is only then referred to if alt is not available and not "". So if alt is "", title will ALWAYS be ignored.
     8
     9It sounds like there is user error in filling out the Media Upload / Edit screen, filling out the Title only. Perhaps a conditional editing of attributes can be employed to deal with this:
    710
    811{{{
     
    1114}
    1215}}}
     16
     17and then output in the <img> tag alt, whether or not it is an empty string, and title only if it is not an empty string.