[Malvern] Invisible webpage elements meant for AT usersnot showing

Ian Pascoe ianpascoe at btinternet.com
Tue Apr 10 22:14:40 BST 2007


Hi Guys

This is mainly aimed at Phil and Darren, but there's been quite a bit of
mail on this subject over the weekend, and this seems to be quite a
definitive statement on things.

Ian

-----Original Message-----
From: orca-list-bounces at gnome.org [mailto:orca-list-bounces at gnome.org]On
Behalf Of Benjamin Hawkes-Lewis
Sent: 10 April 2007 21:59
To: listaddr1 at gmx.net
Cc: orca-list at gnome.org
Subject: Re: [orca-list] Invisible webpage elements meant for AT
usersnot showing


Okay, the following discussion will get somewhat web-technical.

Looking at the particular Zum Inhalt link in question, I think the
correct behaviour for a talking user agent is to speak the link.

The setting of the display:none refers to aural and braille every bit as
much as visual rendering, as is made clear by the CSS 2.1 specification
at:

http://www.w3.org/TR/CSS21/aural.html#propdef-speak

However, CSS rules can be restricted to particular media types, such as
screen, print, braille, and speech:

http://www.w3.org/TR/CSS21/media.html

In this case, the CSS rule that suggests display:none for the inv class
is applied to the XHTML using the following link element:

<link rel="appliesstylesheet" type="text/css"
href="styles/styles.css" />

The XHTML media attribute can be applied to link elements that import a
stylesheet:

http://www.w3.org/TR/html401/struct/links.html#edef-LINK

It is not present in this case, which means user agents should use its
default value, which is "screen":

http://www.w3.org/TR/html401/present/styles.html#adef-media

That means all the CSS is targeted to screen media and should not be
applied by speech or braille user agents for ordinary purposes, but only
when investigating what sighted users are seeing.

display:none is here restricted to apply only to the screen media type.
So in theory, the author has done the right thing if they want to hide
the skip link for screen media users and show it to other media users,
including users of so-called "screen readers".

In practice, however, for older assistive technology this technique
isn't a backwards compatible approach to showing their users content
that is hidden from sighted users. Earlier versions of JAWS failed to
read text with display:none set, even if the property was explicitly
restricted to the screen media. A more widely compatible method, in
practice, is to use a screen-targeted rule that absolutely positions
such content off the screen, e.g.:

.inv {left: -9999px; position:absolute;}

See http://css-discuss.incutio.com/?page=ScreenreaderVisibility for a
discussion and test results of various methods. See also a similar
discussion in the Working Draft of the CSS techniques for Web
Accessibility Content Guidelines 2.0:

http://www.w3.org/TR/WCAG20-CSS-TECHS/#C7

Where they recommend a somewhat more complex style:

.inv {height: 1px; width: 1px; position: absolute; overflow: hidden;
top: -10px;}

To sum up, the right thing to do in this situation is to notify the
webmaster that the method they are using to show text to screen reader
users but not sighted users is not reliable, and to point them to the
css-discuss page I linked earlier for further information.

The ideal thing for user agents like Firefox to do would be to evaluate
and expose aural, braille, and other media styles in its DOM (Document
Object Model) and to accessibility frameworks for use by assistive
technology like Fire Vox and Orca. Currently, Fire Vox supports a subset
of aural CSS but only by reparsing all the styles for a page to extract
the aural CSS rules. See also the relevant Firefox bug 47159:

https://bugzilla.mozilla.org/show_bug.cgi?id=47159

In lieu of this, Orca could download the stylesheets and parse out the
relevant CSS styles. There is at least one GPL CSS parsing library for
Python that could be adapted to this purpose:

http://cthedot.de/cssutils/

I'd like to add a note about the desirability of hiding skip links such
as this. There may well be a lot of content where it makes sense to try
and restrict it to non-visual users. But while a hidden skip link is
better than no skip link, an optimal situation is often to show the skip
link even to sighted users. While they may not be hearing the page read
out, they may well be using keyboard navigation to move through the
page, especially if they have motor disabilities. A visible skip link
allows them to move through the page much faster.

I hope that helps a bit with this rather confusing topic.

--
Benjamin Hawkes-Lewis


On Tue, 2007-04-10 at 09:43 +0200, Lukas Loehrer wrote:
> Hi all,
>
> the discussion about image links and dradio.de made me notice the
> following problem:
>
> When viewed with a text browser like w3m, the page http://dradio.de"
> has a "Zum Inhalt" (Skip to main content" lik at the top. This link is
> not visible in  Firefox with orca, and here is why:
>
> The markup looks like this:
>
> a name="oben"></a>
>
> <a href="/#hauptinhalt" class="inv">Zum Inhalt</a>
>
>
> Notice the class="inv" attribute. In the stylesheet
> http://dradio.de/styles/styles_screen.css, the declaration for this
> class looks like this:
>
> .inv {display:none}
>
> Now, Firefox correctly hides elements with display=none in the
> accessible tree, which is what AT ultimately uses to display the page.
> On the other hand, the above is clearly meant to be seen by AT users.
>
> I was wondering:
> >From the perspective of the AT maker, what would be the correct way to
hide
> a page element from sighted users and keep it accessible to AT.
>
> Also, any idea waht could be done about situations like the above?
>
> Best regards, Lukas
> _______________________________________________
> Orca-list mailing list
> Orca-list at gnome.org
> http://mail.gnome.org/mailman/listinfo/orca-list
> Visit http://live.gnome.org/Orca for more information on Orca

_______________________________________________
Orca-list mailing list
Orca-list at gnome.org
http://mail.gnome.org/mailman/listinfo/orca-list
Visit http://live.gnome.org/Orca for more information on Orca





More information about the Malvern mailing list