[wp-trac] [WordPress Trac] #29699: add_theme_support( 'screen-reader-text' );

WordPress Trac noreply at wordpress.org
Mon Oct 27 00:55:39 UTC 2014


#29699: add_theme_support( 'screen-reader-text' );
-------------------------+------------------------------
 Reporter:  GaryJ        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Themes       |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  accessibility
-------------------------+------------------------------

Comment (by GaryJ):

 Replying to [comment:16 obenland]:
 > I don't think that this is a good use of the theme support mechanism. Of
 course themes are not guaranteed to define `.screen-reader-text`, but they
 also might not define `.wp-caption` for example.

 That's not a similar example. If a theme doesn't have `.wp-caption`, then
 the captions are still present, albeit not styled. It will inherit
 whatever the parent of body styles are.

 Consider if the patch wasn't accepted. If a theme doesn't include
 `.screen-reader-text`, and WP core starts outputting extra content for the
 purposes of accessibility, when it should otherwise by visually hidden,
 then that could start breaking content layout, and all because WP core got
 upgraded. The only sensible way for a theme to opt in, is to add theme
 support.

 > The class has been in use for over 5 years now, default themes use it,
 starter themes use it, functions proposed in #29808 use it.

 Do default themes use it to visually hide output from core, or just extra
 bits added by themselves? This proposal is to enhance accessibility
 potentially for all themes, in one go, if they opt in, and not require
 inconsistent efforts on an individual theme basis. The opening report
 already highlights three tickets which are effectively halted by the lack
 of such mechanism, and there may be more I've not found.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29699#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list