WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: RE: Do screen readers read hidden text?

for

Number of posts in this thread: 3 (In chronological order)

From: Hoffman, David
Date: Sun, Jul 13 2003 7:55AM
Subject: RE: Do screen readers read hidden text?
No previous message | Next message →

Hi Alastair,

The label tag _is_ just for form controls.

Exactly how do you use hidden text now? I welcome the opportunity to ensure
that any proposed or defector standards meet all coding requirements (as you
indicated, through my "JAWS source", as appropriate).

From what I can tell, the media attribute of CSS2 will be a preferred
technique once it is fully supported by browsers and once the vast majority
of the target audience uses those browser versions and once it is assured
that ignoring media="screen" will not prevent screen readers from reading
information that is intended for all users. As it stands now, media="aural"
(intended for speech synthesizers) is not supported by browsers.
Media="screen" has limited support, and seems to be used primarily to
differentiate from print, rather than to restrict screen readers from
reading information that appears on the screen. Restricting screen readers
from reading information that is intended for the screen, without ensuring
that there is an appropriate alternative for screen readers would be
dangerous! See
http://www.codestyle.org/css/media/screen-BrowserSummary.shtml and
http://www.greytower.net/en/archive/articles/cssmedia.html for more
information about browser support.

Hidden text is actually common in web applications or dynamic web sites. It
may be used to hide information that was served with a page, but is not
always displayed (depending on various circumstances). It can also be used
to hide information that is required for programmatic purposes but is not
intended for any users, under any circumstances. If the screen reader reads
information that is intended to be hidden from all users, (temporarily or
permanently), the pages can become virtually unusable. Therefore, even if
CSS2 were fully supported, browsers should still ignore hidden text -- and
you would anyway have alternative means (media="aural") of providing
information just for screen readers.

An exception is being made for hidden text in label tags because it is
extremely useful to be able to provide additional information with a field
label and because developers do not seem to have a need to use hidden text
that is not intended for any user -- within label tags.

I welcome further discussion on this matter.

Take care,
David

David Hoffman
IT Accessibility Specialist
MILVETS Systems Technology, Inc.

-----Original Message-----
From: Alastair Campbell [mailto: = EMAIL ADDRESS REMOVED = ]
Sent: Sunday, July 13, 2003 8:46 AM
To: = EMAIL ADDRESS REMOVED =
Subject: RE: Do screen readers read hidden text?


David Hoffman wrote:
> I am told that JAWS 5.0 will ignore such hidden text unless it is in
> explicit label tags. This will allow developers to supplement the
> screen text for the benefit of screen readers, when necessary.

Hi David,

I don't suppose you could ask your Jaws source what the rational is for
this?

I thought that the label tag was just for form controls, which would mean
you couldn't use this method for most of the purposes I currently use hidden
text/links.

Wouldn't a better method be to use the media attribute of the style sheet?
So if a style sheet was set to media="screen", Jaws would ignore the rules
defined in that sheet. If the developer knows enough to be usefully hiding
text from visual browsers, they are fairly likely to know about the media
attribute.

This would also have the advantage of being much easier for people (like
me) to alter the current sites without having to change more than one line
in the HTML. I have a fairly delicate balance of graceful degradation using
style sheets that lumps browsers into 3 main
categories:
- Basic text / non-visual browsers (lynx etc that have no support for CSS,
but receive well structured HTML).
- Older browsers (e.g. Netscape 4, that understand some styles, but not the
@import rule. They receive a slightly plainer version).
- Version 5+ browser (that do understand the @import rule, and get all the
styles).

At the moment, screen readers sit with the Older browsers, since they ignore
the @import, and this is advantageous for the user group. Adding support for
the @import to Jaws would have the effect of making it more difficult to
help screen reader users.

I'm trying to think of a situation where a developer would hide content, and
it would help someone with a screen-reader or text based browser not to
receive that content, but I can't think of one.

-Alastair


----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/


----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/

From: Alastair Campbell
Date: Sun, Jul 13 2003 9:36AM
Subject: RE: Do screen readers read hidden text?
← Previous message | Next message →

Hi David,

Thanks for taking the time to correspond on this. I think I need to
clarify some of the techniques and scenarios I referred to. I'm speaking
here mainly from the point of view of a front-end developer.

> Exactly how do you use hidden text now?

The most common usage is to hide skip links. As pointed out earlier,
they should probably be provided visually, but I tend to use CSS based
layouts with the content at the top of the HTML page. I'm not sure who
would benefit from visual skip links in this case, since when tabbing
through links most browsers follow the code rather than layout.

Sometimes, I also like to provide some contextual information for
non-graphical browsers. For example, if a page has several sections and
lots of links, I would have (hidden) headings such as "Navigation" or
"Upcoming events". These help provide the context that a visual browser
shows with layout.

> From what I can tell, the media attribute of CSS2 will be a preferred
> technique once it is fully supported by browsers

Your absolutely right to point out browser support, which is required
before screen reader support, and thanks for those links :)
Aural support isn't there at all yet.

What I'm suggesting *might* be possible already (it needs checking) -
the difference between media="all" (the default) and media="screen".
Most style sheets don't have a media attribute set, so wouldn't be
affected. Those wanting to hide things from visual browsers but not
screen readers, could do so in a screen style sheet.

The table from the Codestyle site shows that the common browsers used by
people with screen readers (Internet Explorer 5+) do support the screen
style sheet. What I'm not sure of, is whether Jaws can tell the
difference (through IE) between all and screen.

> Hidden text is actually common in web applications or dynamic
> web sites.
Aren't these usually hidden in comments or something, rather than with
style sheets?

> It can also be used to hide information that is required
> for programmatic purposes but is not intended for any users
Are these hidden with styles? Hidden inputs for forms are hidden by the
HTML, but I would be out of my depth in commenting on large-scale back
end processes!
What are the methods used to hide this type of information?

Currently, screen readers (well, Jaws at least) will hide things that
are hidden by most techniques. Inline styles (in the HTML) and linked
style sheets. It is only things hidden by a class from an imported style
sheet that are not hidden to Jaws users.

I would suggest that this is either maintained, or slightly altered by
recognising imported styles, but not style sheets with a media of
screen.
For the vast majority of sites, people would not notice the difference
because they don't provide hidden links, and don't tend to use imported
styles.

However, for those people who do try and make life easier for users of
text browsers & screen readers, it would be an easy method.

Depending on how it is implemented, the hidden label text could be
useful, but I'd would still like a more general method.

All the best,

-Alastair


----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/

From: Tom Gilder
Date: Sun, Jul 13 2003 10:56AM
Subject: Re: Do screen readers read hidden text?
← Previous message | No next message

On Sunday, July 13, 2003, 4:32:31 PM, Alastair Campbell wrote:
> The most common usage is to hide skip links. As pointed out earlier,
> they should probably be provided visually, but I tend to use CSS based
> layouts with the content at the top of the HTML page. I'm not sure who
> would benefit from visual skip links in this case, since when tabbing
> through links most browsers follow the code rather than layout.

Probably nobody - but they will benefit from skip to *navigation*
links. By the way, here's what I use to hide skip links:

a.skip {
position: absolute;
overflow: hidden;
width: 0;
height: 0;
}

a.skip:active, a.skip:focus {
position: absolute;
overflow: visible;
width: auto;
height: auto;
background-color: yellow;
color: red;
top: 5px;
left: 5px;
padding: 5px;
border: 2px solid red;
font-weight: bold;
}

...I find it works fairly well myself. The only modern graphical
browser that doesn't like it is Opera, but that's got
better-than-average keyboard navigation anyway.

--
Tom Gilder, http://tom.me.uk/
Blog! http://blog.tom.me.uk/



----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/