WordPress.org

Make WordPress Core

Opened 15 years ago

Closed 14 years ago

Last modified 3 years ago

#3744 closed defect (bug) (fixed)

required attribute "alt" not specified.

Reported by: awallin Owned by:
Milestone: 2.5 Priority: high
Severity: normal Version: 2.1
Component: TinyMCE Keywords: dev-feedback
Focuses: Cc:

Description

When I write posts in wp (using the visual editor) and insert images into my posts I usually don't bother inserting an ALT text. AFAIK an empty ALT attribute should be valid XHTML.
However, I find that WP2.1 creates posts for me with _no_ ALT tag, and that results in a lot of errors when I do XHTML validation.
My site is at www.anderswallin.net if you want to try this.

Change History (18)

#1 @foolswisdom
15 years ago

awallin, thank you for the detailed bug report!

Relates to #3100.

#2 @awallin
15 years ago

#3100 mentios upload via the admin panel. The behaviour then seems to be that ALT is set to the filename.

I usually upload my images with a separate ftp client, and insert the pictures using the image icon of the visual editor. I type in the url of the image and click OK. This should set the ALT attribute to an empty string, and not leave out the ALT attribute altogether.

#3 @Nazgul
15 years ago

  • Keywords TinyMCE dev-fedback added

2.1.1 is out, so bumping the milestone to 2.1.2.

Should TinyMCE bugs be fixed here or reported upstream?

#4 @Nazgul
15 years ago

  • Milestone changed from 2.1.1 to 2.1.2

#5 @rob1n
15 years ago

  • Component changed from General to TinyMCE

#6 @foolswisdom
15 years ago

  • Milestone changed from 2.1.3 to 2.3

#7 @cpoteet
15 years ago

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

#8 @cpoteet
15 years ago

  • Cc foolswisdom added
  • Keywords images ALT XHTML TinyMCE removed
  • Resolution set to invalid
  • Status changed from assigned to closed

There is an image description box in the TinyMCE dialog box. It seems to be user error. You can't expect the machine to do everything for you :)

#9 follow-up: @rob1n
15 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

But what if the user doesn't want to add in a description? IMO, TinyMCE should correct for this and use at least a blank alt="" attribute.

#10 in reply to: ↑ 9 @JeremyVisser
15 years ago

Replying to rob1n:

But what if the user doesn't want to add in a description? IMO, TinyMCE should correct for this and use at least a blank alt="" attribute.

+1 for that suggestion.

#11 @JeremyVisser
15 years ago

  • Keywords dev-feedback added; dev-fedback removed

#12 @markjaquith
15 years ago

Reluctant +1

The point of the blank alt="" is to designate images that don't need alternative representation. Usually that means background images or images used to break up content. alt="" shouldn't act as a crutch for people who are too lazy to provide an alternative representation for their images. By doing this for them, we're validating their laziness by hiding the symptom. That said, WordPress should publish valid code out of the box. Let the accessibility validators ding them for all the blank alt=""

#13 follow-up: @westi
15 years ago

I am also reluctant to support this from the accessibility point of view.

If it is to go in we need to push it upstream as it is a change to TinyMCE and if they will make the change then it will get pulled into the next version of WP as we update TinyMCE.

#14 in reply to: ↑ 13 @Nazgul
15 years ago

Replying to westi:

I am also reluctant to support this from the accessibility point of view.

An empty alt tag is better than none, because if there is no alt tag present, most screenreaders will speak the filename. That doesn't sound very accessible to me.

#15 @ryan
14 years ago

  • Milestone changed from 2.3 to 2.4 (next)

#16 @cpoteet
14 years ago

  • Owner cpoteet deleted
  • Status changed from reopened to new

I think this is a TinyMCE issue and not a WP issue.

#17 @azaozz
14 years ago

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

TinyMCE 3 inserts empty alt if nothing is entered in the field.

This ticket was mentioned in Slack in #accessibility by rianrietveld. View the logs.


3 years ago

Note: See TracTickets for help on using tickets.