On 8/2/09 23:33, Ben Lau wrote:
Are there any (seriously) bad implications of having empty DIVs around
your HTML document? I try to avoid using them personally, but there are
cases where the visual design has forced me to add empty divs (or spans)
just to achieve the look.
Apart from adding extra weight and cluttering the document, I understand
screen readers do not pick up divs and spans?

The short answer is that at most they would treat an empty "div" or "span" as a blank line or space. I wouldn't worry about it.

The long answer is that it is possible to overload "div" and "span" elements with content and functionality in other ways that might get picked up by screen readers (using ARIA), but that's not the scenario you're describing.

Would I be better off to insert these meaningless decorative tags using
javascript and modifying the DOM, while non-javascript users would see a
more cut down version of the design?

As far as I can see, you would not be helping non-JS users by doing so.

Do screen readers pick up javascript and events?

Popular screen readers are not web browsers themselves. Instead, they are system-wide services that provide an aural and/or braille output and keyboard input interface to the desktop environment and applications like office software, media players, and (most importantly, for your purposes) popular web browsers. See links at:

http://delicious.com/benjaminhawkeslewis/howScreenReadersWork

Popular web browsers, of course, can pick up on JavaScript and events. But DHTML communication to screen readers users can break down on various levels. For example:

1. Failure to bind functionality to standard UI controls like buttons, hyperlinks, and form controls might lead to screen readers users being unaware that functionality is available or unable to activate such functionality.

2. Scripted changes to the page might not be picked up by the screen reader. Screen readers often work with a sort of snapshot of the structure and content of the web document (a virtual buffer). Sometimes this snapshot is not updated when the real document is altered by script.

3. The user might not be alerted to changes to the page or snapshot.

4. The user might be constantly interrupted by irrelevant changes.

For further reading see:

http://delicious.com/benjaminhawkeslewis/accessibility+ajax

And for accessibility best practices generally see:

http://www.w3.org/WAI/intro/wcag.php

http://www.rnib.org.uk/xpedio/groups/public/documents/code/public_wacsitemap.hcsp

Hope that helps.

--
Benjamin Hawkes-Lewis


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Reply via email to