Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#7536 closed defect (bug) (fixed)

Avatar alt isn't attribute-escaped, nor translated

Reported by: nbachiyski's profile nbachiyski Owned by:
Milestone: 2.7 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:

Description

In [8661] the avatar alt default value is Avatar and cannot be translated.

Also, if the avatar alt contains ' or tags, it will break the HTML code.

Attachments (2)

better-avatar-alt.diff (1.6 KB) - added by nbachiyski 16 years ago.
7536-fix-phpdoc.diff (725 bytes) - added by Speedboxer 16 years ago.
Change phpdoc to say that the default is blank

Download all attachments as: .zip

Change History (9)

#1 @ryan
16 years ago

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

(In [9076]) Avatar alt fixes from nbachiyski. fixes #7536

#2 follow-up: @matt
16 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Giving every avatar a default alt text of "avatar" is very bad accesibility, I can't imagine anything more annoying to a screen reader.

http://en.wikipedia.org/wiki/Alt_attribute

"While the use of meaningful alt text is necessary to comply with accessibility standards, and is good practice, sometimes an image is used for purely decorative purposes. In this case, one should use an empty alt attribute (alt="")."

#3 in reply to: ↑ 2 @ShaneF
16 years ago

Replying to matt:

Giving every avatar a default alt text of "avatar" is very bad accesibility, I can't imagine anything more annoying to a screen reader.

Agree.

#4 @westi
16 years ago

Although I introduced this for #7523 I agree with matt here that the default should be empty.

Having a page full of Avatars being read out would get a little frustrating when viewing comments.

#5 @westi
16 years ago

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

(In [9127]) Default to an empty alt attribute on Avatars. Fixes #7536.

@Speedboxer
16 years ago

Change phpdoc to say that the default is blank

#6 @Speedboxer
16 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

The phpdoc text needs to be changed to say the default is blank.

#7 @ryan
16 years ago

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

(In [9200]) get_avatar() phpdoc update from Speedboxer. fixes #7536

Note: See TracTickets for help on using tickets.