Make WordPress Core

Opened 19 years ago

Closed 18 years ago

Last modified 13 months ago

#3100 closed defect (bug) (fixed)

Images shouldn't have alt attributes of filenames

Reported by: matt's profile matt Owned by: rob1n's profile rob1n
Milestone: 2.3 Priority: normal
Severity: normal Version: 2.0.4
Component: Administration Keywords: has-patch commit dev-feedback
Focuses: Cc:

Description

When you upload a photo, and don't give it a title, it gets a title of the filename.

Then when you insert the picture into the editor, if gives the picture an alt attribute withthe file name.

Under no circumstances should default behavior give alt attributes of filenames, so we should avoid this.

Attachments (1)

3100_upload-alt.patch (458 bytes) - added by cpoteet 18 years ago.
Fix.

Download all attachments as: .zip

Change History (21)

#1 @Nazgul
18 years ago

  • Keywords needs-patch added
  • Milestone set to 2.0.4
  • Version set to 2.1

Any suggestions on what should be in the alt attribute? Or do we leave it empty?

#2 @Nazgul
18 years ago

  • Milestone changed from 2.0.4 to 2.1
  • Version changed from 2.1 to 2.0.4

Damn. That should be the other way around. :)

#3 @matt
18 years ago

  • Milestone changed from 2.1 to 2.2

#4 follow-up: @cpoteet
18 years ago

  • Owner changed from skeltoac to cpoteet
  • Status changed from new to assigned

#5 in reply to: ↑ 4 @cpoteet
18 years ago

What do you think should be replaced instead of the filename? alt="" isn't a much better option.

#6 @matt
18 years ago

Blank is better than something that's not actually alt text:

http://diveintoaccessibility.org/day_21_ignoring_spacer_images.html

#7 @markjaquith
18 years ago

Amazon's Mechanical Turk to the rescue! :-)

But seriously... if we don't have data in the form of a manually specified title, the best thing we can do is use alt=""

#8 @foolswisdom
18 years ago

Relates to #3744

@cpoteet
18 years ago

Fix.

#9 @cpoteet
18 years ago

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

It's not pretty, but it's better than the alt tags with no semantic value.

#10 @rob1n
18 years ago

  • Keywords has-patch added; needs-patch removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

cpoteet: Welcome to the WordPress Trac, but just FYI we don't close the ticket as "fixed" until it's committed into the trunk.

#11 @cpoteet
18 years ago

Is this going to be added to the trunk?

#12 @foolswisdom
18 years ago

  • Milestone changed from 2.2 to 2.3

#13 @cpoteet
18 years ago

  • Milestone changed from 2.3 to 2.2
  • Priority changed from normal to high
  • Severity changed from normal to major

#14 @rob1n
18 years ago

  • Milestone changed from 2.2 to 2.3
  • Priority changed from high to normal
  • Severity changed from major to normal

It's hardly essential, so bumping to 2.3. Only essential bugfixes are going in 2.2 as of this point.

#15 @RuddO
18 years ago

I actually think the file name is a good default, provided it's stripped from the extension. Now, what would be AWESOME is if clicking on the attachment name made the name into a text box, that onBlur renamed the file using AJAX or something like it. Thus, the usability problem of taking the file name as the attachment title (and corresponding alt attribute) becomes a minor annoyance.

#16 @Nazgul
18 years ago

The filename, even without the extension, should never be used for the alt tag.

A filename is bound by the limitations of the filesystem, therefore people often replace spaces with underscores or use CamelCase. I don't know if you've ever listened to a screenreader trying to pronounce that. It's just plain ugly.

I'd rather see empty alt attributes than filenames (with or without extension). Although making a meaningfull alt attribute mandatory would get a +100 from me.

(Anecdote: A blind friend of mine showed me a site which was read to us by his screenreader. During the reading it said "spacer.gif" over 50 times before even reaching the actual content on that page. Every time you mention the word spacer.gif in his vicinity nowadays he starts to twitch ;) )

#17 @cpoteet
18 years ago

  • Keywords commit dev-feedback added

#18 @rob1n
18 years ago

  • Owner changed from cpoteet to rob1n
  • Status changed from reopened to new

#19 @foolswisdom
18 years ago

  • Summary changed from Awful alt attributes to Images shouldn't have alt attributes of filenames

#20 @rob1n
18 years ago

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

(In [5653]) Better use empty alt attribute than the filename. Props cpoteet. fixes #3100

Note: See TracTickets for help on using tickets.