Support » Requests and Feedback » Uploading Media – Alt vs. Title

  • Why did WordPress developers choose to auto-populate the Title attribute of an image on upload? The Title attribute is not as important as the ALT attribute.

    When uploading an image, WordPress assigns the image name to the Title attribute, and nothing to the Alt attribute.

    Should be the other way around!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Mel Choyce

    (@melchoyce)

    Hi @pmagony,

    What would you expect to be automatically populated into the alt attribute? The title is almost always never descriptive enough to be useful for folks using screen readers.

    As stated, I’d expect by default (on upload) the image file name to be put into the ALT field rather than into the TITLE. If my file name is keyword-keyword.jpg its a win-win.

    • This reply was modified 5 months, 1 week ago by  F C.
    Moderator Mel Choyce

    (@melchoyce)

    That’s not a helpful alt tag, though — ideally, your alt tag would be a sentence or more describing the image. By auto populating the alt attribute field with the image title, WordPress might actually discourage people from writing a good alt tag.

    Moderator Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    When uploading an image, WordPress assigns the image name to the Title attribute, and nothing to the Alt attribute.

    Huh, wasn’t the title attribute removed ages ago in core? Do you have an old version of core? Or are you using a plugin to do that? Title attributes are not recommended because they are a real nuisance to people using assistive technologies.

    F C

    (@pmagony)

    @anevins – I’m running the latest version of WP and I have never not seen the Title tag on the media/upload feature. It has always been there.

    @melchoyce – You’re completely missing the point. If you think my example is not a good Alt tag, then what are your feelings about the Title field? After all, that is exactly what WP is doing – dumping the file name into the Title field. All I’m saying is that IF you’re going to auto-populate a field, it should be the Alt tag, not the Title tag.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    I agree with Mel on this one. The alt tag is used by screenreaders and other accessibility programs to help describe the contents of the image. Having it read a filename by default isn’t useful to those users.

    Having a blank alt field results in screenreader software ignoring the image, and while that isn’t ideal, it’s better than having it read keywords to them.

    Title on the other hand, isn’t useful for much of anything for images these days. Auto-populating it doesn’t hurt, but probably doesn’t help anything either.

    F C

    (@pmagony)

    The Alt tag serves purposes beyond just screen readers, and for that reason, it should always be populated. And to further my position, we all agree the Title tag is, for the most part, useless.

    • This reply was modified 5 months ago by  F C.
    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    It should be populated, yes, but it should not be populated with invalid or useless text. Auto-filling it with something isn’t likely to produce good results.

    However, it is also acceptable under both WCAG and HTML conformance guidelines for there to be no alt tag on an image when there is an aria-label on it, or when it is provided with a caption using figure and figcaption elements.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.