Ticket #3100 (closed defect (bug): fixed)

Opened 2 years ago

Last modified 2 years ago

Images shouldn't have alt attributes of filenames

Reported by: matt Assigned to: rob1n
Priority: normal Milestone: 2.3
Component: Administration Version: 2.0.4
Severity: normal Keywords: has-patch commit dev-feedback
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

3100_upload-alt.patch (458 bytes) - added by cpoteet on 02/17/07 23:37:35.
Fix.

Change History

10/03/06 22:55:26 changed by Nazgul

  • keywords set to needs-patch.
  • version set to 2.1.
  • milestone set to 2.0.4.

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

10/03/06 22:55:58 changed by Nazgul

  • version changed from 2.1 to 2.0.4.
  • milestone changed from 2.0.4 to 2.1.

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

12/01/06 02:57:11 changed by matt

  • milestone changed from 2.1 to 2.2.

(follow-up: ↓ 5 ) 12/06/06 04:56:21 changed by cpoteet

  • owner changed from skeltoac to cpoteet.
  • status changed from new to assigned.

(in reply to: ↑ 4 ) 12/23/06 05:09:03 changed by cpoteet

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

12/23/06 07:41:58 changed by matt

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

http://diveintoaccessibility.org/day_21_ignoring_spacer_images.html

12/23/06 10:53:13 changed by markjaquith

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=""

02/03/07 18:32:45 changed by foolswisdom

Relates to #3744

02/17/07 23:37:35 changed by cpoteet

  • attachment 3100_upload-alt.patch added.

Fix.

02/17/07 23:38:42 changed by cpoteet

  • status changed from assigned to closed.
  • resolution set to fixed.

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

02/18/07 00:40:18 changed by rob1n

  • keywords changed from needs-patch to has-patch.
  • status changed from closed to reopened.
  • resolution deleted.

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

03/09/07 01:05:44 changed by cpoteet

Is this going to be added to the trunk?

03/27/07 22:35:42 changed by foolswisdom

  • milestone changed from 2.2 to 2.3.

04/19/07 03:00:46 changed by cpoteet

  • priority changed from normal to high.
  • severity changed from normal to major.
  • milestone changed from 2.3 to 2.2.

04/19/07 03:08:44 changed by rob1n

  • priority changed from high to normal.
  • severity changed from major to normal.
  • milestone changed from 2.2 to 2.3.

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

04/19/07 16:36:16 changed by RuddO

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.

04/19/07 16:54:45 changed by Nazgul

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 ;) )

05/31/07 02:17:52 changed by cpoteet

  • keywords changed from has-patch to has-patch commit dev-feedback.

05/31/07 03:07:45 changed by rob1n

  • owner changed from cpoteet to rob1n.
  • status changed from reopened to new.

05/31/07 15:54:25 changed by foolswisdom

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

06/05/07 04:40:10 changed by rob1n

  • status changed from new to closed.
  • resolution set to fixed.

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