[wp-trac] [WordPress Trac] #29699: add_theme_support( 'screen-reader-text' );
WordPress Trac
noreply at wordpress.org
Wed Oct 1 23:53:22 UTC 2014
#29699: add_theme_support( 'screen-reader-text' );
-------------------------+------------------------------
Reporter: GaryJ | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: accessibility
-------------------------+------------------------------
Comment (by GaryJ):
Replying to [comment:7 mrwweb]:
> I don't know if this is an edge case or major use case, but I often find
that I need two "screen-reader-text" classes, one for hidden alternative
text (i.e. icon labels) and another for links that should be visible when
they have `:focus` (i.e. "skip to content links, etc."). Should this
support both? Are they actually different. Is the `:focus` case not
relevant here? (Or is it even the assumed use case?)
Thanks for bringing this point up. I had considered it, but hadn't
documented any notes about it.
If you look at https://github.com/RRWD/leiden/issues/1#issue-38779796
(linked in the original post), you'll see that wp-admin and Twenty
Fourteen both use `screen-reader-text:focus`, Bootstrap uses a second
class, and H5BP uses a modifier class along with the original. From a CSS
point of view, either the first or third approaches are best for most
flexibility and code-reuse, so there shouldn't need to be a second class.
If you ''do'' have a second class, that's fine - but it should only be
concerned with bringing back something previously visually hidden and
styling it to look good - and that's not something this ticket is directly
concerned with, since it's only looking at hiding potentially new extra
bits for backwards compatibility.
Should there be a need however, for a second class dealing with focusable
stuff (i.e. WP started outputting an opt-in automatic Skip Links section),
then adding a second or third key to the theme support args array with a
default would be trivial to do.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29699#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list