W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > January to March 2006

Re: Display: none

From: David Woolley <david@djwhome.demon.co.uk>
Date: Tue, 14 Mar 2006 21:55:50 +0000 (GMT)
Message-Id: <200603142155.k2ELtoP01188@djwhome.demon.co.uk>
To: w3c-wai-ig@w3.org

> 	The context that I was planning to use this, was to hide h1 text
> titles from visual browsers by using the display: none property to hide
> them and replacing them with graphical titles displayed using the css
> background property.

display:none hides background as well.   However, headings, even as 
image replacement, are NOT background, so it is an abuse of HTML to 
encode them as such.  One could validly consider them to be styling, 
but IE doesn't support :content in CSS.

In any case, it is quite reasonable to disable images on a visual
browser, so if your proposal worked, those users would see nothing.
The other thing that risks breaking with this sort of tactic is the
generation of tables of contents.  I'm not sure how CSS aware browser
that do these, like Amaya, handle a display:none heading.

Yet another problem here is that it is normal to configure visual
browser to not print background images.  Whilst, in my experience,
very few commercial web pages give any consideration to the fact
that someone might want to print them, I certainly don't think
we should be encouraging new ways of breaking printing.

Given the limitations of typical current browser, I think the only
reasonable approach is
<h1><img alt="proper text title" src="branded title"></h1>

There is also the issue that IE will not scale image replacements with
the real text, so any use of image replacement for text that is not
primarily decorative, discriminates against users with poor eyesight,
but who still prefer to use visual content.

Regarding "screen readers".  I presume you actually mean speech 
output assistive technology for viewing web pages.  Pure screen
readers would speak that text which was visible to a visual user
and ignore images, or attempt to OCR them.  A true speech browser,
would ignore anything that display:none in the general or speech
style sheets (whichever had priority).

Tools like JAWS will do whatever their authors thought was most
likely to work with real life web page, subject to user configuration

> 	<h1><span class=3D"hidethis">This is my title</span></h1>  =20

Possibly part of your problem is that you don't realise that this

> 	This email should not be used by anyone who is not an original
> intended recipient. Nor may it be copied or disclosed to anyone who is

I believe more people are alive today than have ever died, so this only
refers to a minority of the whole of humanity.  Can I use this as
a precedent that you didn't mean to be confidential in any marginal
Received on Tuesday, 14 March 2006 22:07:46 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:33 UTC