[wp-trac] [WordPress Trac] #15926: Give header and background images alt tags

WordPress Trac wp-trac at lists.automattic.com
Sun Jan 9 06:34:23 UTC 2011


#15926: Give header and background images alt tags
---------------------------------------+-----------------------------
 Reporter:  jane                       |       Owner:
     Type:  defect (bug)               |      Status:  new
 Priority:  normal                     |   Milestone:  Future Release
Component:  Accessibility              |     Version:  3.0
 Severity:  minor                      |  Resolution:
 Keywords:  3.2-early gci needs-patch  |
---------------------------------------+-----------------------------
Changes (by garyc40):

 * keywords:  3.2-early, 508-compliance => 3.2-early gci needs-patch


Comment:

 To '''firetag:'''

 You're heading in the right direction :)

 However, there are a few issues with your approach, so I need you to do
 some more work on this CGI task:

 - The function name (as well as theme_mod name) should be {{{header_alt}}}
 instead of {{{background_alt}}}. This is because background image is
 applied using css, which doesn't let themes utilize the alt attribute.
 Only {{{header_image}}} can have {{{header_alt}}}, in my opinion.

 - The form table row for {{{Alternative Text}}} should only be displayed
 when there's a header image defined (i.e. {{{get_header_image()}}}
 evaluates to true)

 - Also, one small enhancement, move {{{check_admin_referer( 'custom-
 header-options', ... )}}} outside of the {{{if}}} blocks. Otherwise, the
 function could be executed repeatedly.

 - You should also modify Twenty Ten default theme to use {{{header_alt}}}.

 - As Sergey mentioned above, use {{{esc_html()}}} instead of
 {{{preg_replace()}}}. See
 [http://codex.wordpress.org/Data_Validation#Text_Nodes Data Validation].

 This time, try to make a patch. I don't think I reward you points if you
 can't submit a patch. It's part of the contribution process. Use either of
 these guides:

 - [http://markjaquith.wordpress.com/2005/11/02/my-wordpress-toolbox/ Mark
 Jaquith's WP toolbox]
 - [http://blog.ftwr.co.uk/archives/2005/11/03/windows-wordpress-toolbox/
 Peter Westwood's guide, if you're on Windows]

 Once these issues are addressed, I guess the patch would be good enough to
 mark the GCI task as completed.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15926#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list