Re: [WSG] Implication of empty divs

2009-02-10 Thread Gunlaug Sørtun

Ben Lau wrote:

But as far as i know, screen readers do not pick up IDs or classes? 
So even by declaring a div ID="mainNav", it's still not enough to 
describe what's inside the div?


I'm starting to get awfully confused...


A div is an element primarily intended for grouping blocks of content -
hence it defaults to "block" with no further default styling or meaning
in most UAs.

The meaning of IDs and classes is mostly on your (designer/developer)
side of the fence, when you work on the markup.

Normally not enough artificial intelligence at the other side (user-end)
to interpret the meaning of IDs and classes. Well-chosen headlines with
suitable text at or near the beginning of each area make more sense there.

regards
Georg
--
http://www.gunlaug.no


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



Re: [WSG] Implication of empty divs

2009-02-10 Thread Matt Morgan-May
Andy's technically correct, and it's true that pointing to the main content of 
the document is good for accessibility, though not because of semantics so much 
as that you can point to it in a "Skip to main content" link. 
"id='mainContent'" doesn't communicate any semantics by itself. (That's 
something they're working on in HTML5: establishing roles for main content, 
etc.)

The real problem with  is the affliction known as div-itis, where block 
elements which could express semantics and/or which already have default layout 
properties (like ) are ignored in favor of . (Div-itis is also 
strongly correlated with span-itis, which is really more like a plague.)

-
m

On 2/10/09 3:22 PM, "Ben Lau"  wrote:

>From the "CSS Mastery Advanced Web Standards Solutions" book by Andy Budd, and 
>I quote:
"Many people mistakenly believe that a div element has no semantic meaning. 
However div actually stands for division and provides a way of dividing a 
document into meaningful areas. So by wrapping your main content area in a div 
and giving it an ID of mainContent, you are adding structure and meaning to 
your document."

But as far as i know, screen readers do not pick up IDs or classes? So even by 
declaring a div ID="mainNav", it's still not enough to describe what's inside 
the div?

I'm starting to get awfully confused...


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


Re: [WSG] Implication of empty divs

2009-02-10 Thread Ben Lau
>From the "CSS Mastery Advanced Web Standards Solutions" book by Andy Budd,
and I quote:
"Many people mistakenly believe that a div element has no semantic meaning.
However div actually stands for *division *and provides a way of dividing a
document into meaningful areas. So by wrapping your main content area in a
div and giving it an ID of mainContent, you are adding structure and meaning
to your document."

But as far as i know, screen readers do not pick up IDs or classes? So even
by declaring a div ID="mainNav", it's still not enough to describe what's
inside the div?

I'm starting to get awfully confused...


On Tue, Feb 10, 2009 at 5:19 AM, Chris F.A. Johnson wrote:

> On Mon, 9 Feb 2009, Joseph Taylor wrote:
>
>  That's a great link. It also shows that an extra empty element, while it
>> may be "the easy way out" works across the board without side effects of any
>> kind.
>>
>> Yes it is mixing content and presentation.
>>
>
>Many DIVs (and SPANs) are, in fact, used for presentation rather
>than semantic reasons. They exist only so that they can have
>styling applied to them. They don't provide any information about
>WHAT they contain.
>
>  On Feb 9, 2009, at 3:23 AM, Benjamin Hawkes-Lewis <
>> bhawkesle...@googlemail.com> wrote:
>>
>>  On 9/2/09 07:45, Chris F.A. Johnson wrote:
>>>
 How can CSS overflow replace ?

>>>
>>> See http://www.ejeliot.com/blog/59
>>>
>>
> --
>   Chris F.A. Johnson, webmaster 
>   ===
>   Author:
>   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
>
>
> ***
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: memberh...@webstandardsgroup.org
> ***
>
>


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

Re: [WSG] Implication of empty divs

2009-02-09 Thread Gunlaug Sørtun

Ben Lau wrote:

Are there any (seriously) bad implications of having empty DIVs 
around your HTML document?


I understand from that that you mean "nested divs", for multiple
backgrounds etc.

A few extra divs means nothing other than extra weight, but I have
managed to break a few older browsers by going to the extreme.

This is "extreme nesting"...

...where not only the regular layout has deep nesting, but where there's
also a demo consisting of deeply nested divs in the middle of the main
content area.

IE5.01 usually gives up on it - freezes during load, and this is caused
by the demo. Later IE-versions don't seem to have real problems with it.

Some older Opera versions tended to slow down and/or freeze up when the
completely loaded page was scrolled, also caused by the demo. Haven't
noticed any problems in 9.5+ versions.

All browsers work ever so slightly harder than usual to get all pieces
of the demo lined up during scrolling.

So, it is possible to go too far :-)

regards
Georg
--
http://www.gunlaug.no


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



Re: [WSG] Implication of empty divs

2009-02-09 Thread Chris F.A. Johnson

On Mon, 9 Feb 2009, Joseph Taylor wrote:

That's a great link. It also shows that an extra empty element, while it may 
be "the easy way out" works across the board without side effects of any 
kind.


Yes it is mixing content and presentation.


Many DIVs (and SPANs) are, in fact, used for presentation rather
than semantic reasons. They exist only so that they can have
styling applied to them. They don't provide any information about
WHAT they contain.

On Feb 9, 2009, at 3:23 AM, Benjamin Hawkes-Lewis 
 wrote:



On 9/2/09 07:45, Chris F.A. Johnson wrote:

How can CSS overflow replace ?


See http://www.ejeliot.com/blog/59


--
   Chris F.A. Johnson, webmaster 
   ===
   Author:
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)


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



Re: [WSG] Implication of empty divs

2009-02-09 Thread Joseph Taylor
While the   does represent "nothing" in a way, it is something  
and I would say that it's use would be slighty worse than a purely  
empty element.


Joseph R. B. Taylor
Designer/Developer
---
Sites by Joe, LLC
"Clean, Simple & Elegant Web Design"
Phone: (609) 335-3076


On Feb 9, 2009, at 5:47 AM, Benjamin Hawkes-Lewis > wrote:



On 9/2/09 02:44, Gerard Hynes (Gmail) wrote:

I'm not expert about screen readers, but I did run a site I upgraded
through JAWS with some interesting results. The site had alot of
   due to the CMS they were using and JAWS would  
translate

this to/speak out "blank" which wasn't ideal. Am not sure if it would
do the same for  or  or.


Precise behavior will vary with publisher styling of the DOM,  
platform, browser (and version), screen reader (and version), user  
configuration, and the commands used when reading that part of the  
page.


For example, JAWS 10 has a concept of "blank lines". It will read  
out "blank" as you step through a document if you come to something  
that matches that concept. The following variations:


bar
baz

bar
baz

bar
 
 
baz

bar

baz

bar


baz

are _all_ read:

"bar
"blank
"baz"

It also has a configuration setting for whether "blank lines" should  
be spoken with the "Say All" command. If this is off (as it is by  
default), then the above variations would all be read:


"bar
"baz"

--
Benjamin Hawkes-Lewis


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




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



Re: [WSG] Implication of empty divs

2009-02-09 Thread Joseph Taylor

Ben,

That's a great link. It also shows that an extra empty element, while  
it may be "the easy way out" works across the board without side  
effects of any kind.


Yes it is mixing content and presentation.

Joseph R. B. Taylor
Designer/Developer
---
Sites by Joe, LLC
"Clean, Simple & Elegant Web Design"
Phone: (609) 335-3076


On Feb 9, 2009, at 3:23 AM, Benjamin Hawkes-Lewis > wrote:



On 9/2/09 07:45, Chris F.A. Johnson wrote:

How can CSS overflow replace ?


See http://www.ejeliot.com/blog/59

--
Benjamin Hawkes-Lewis


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




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



Re: [WSG] Implication of empty divs

2009-02-09 Thread Juarez P. A. Filho
Wow... Learned a lot on this topic. Actually I'm using "overflow:auto"
but be careful, when zoom in the page sometimes that can break your
layout.


-- 
Regards,
Juarez P. A. Filho
Front-End Developer and Web Consultant
http://juarezpaf.com
"The future belongs to those who believe in the beauty of their
dreams." Eleanor Roosevelt


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



Re: [WSG] Implication of empty divs

2009-02-09 Thread James Ducker
On a side note, there is a Firefox addon that reproduces JAWS-like
output (in text), called Fangs. Link:
http://www.standards-schmandards.com/projects/fangs/

- James


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



Re: [WSG] Implication of empty divs

2009-02-09 Thread Benjamin Hawkes-Lewis

On 9/2/09 02:44, Gerard Hynes (Gmail) wrote:

I'm not expert about screen readers, but I did run a site I upgraded
through JAWS with some interesting results. The site had alot of
   due to the CMS they were using and JAWS would translate
this to/speak out "blank" which wasn't ideal. Am not sure if it would
do the same for  or  or.


Precise behavior will vary with publisher styling of the DOM, platform, 
browser (and version), screen reader (and version), user configuration, 
and the commands used when reading that part of the page.


For example, JAWS 10 has a concept of "blank lines". It will read out 
"blank" as you step through a document if you come to something that 
matches that concept. The following variations:


bar
baz

bar
baz

bar
 
 
baz

bar

baz

bar


baz

are _all_ read:

"bar
"blank
"baz"

It also has a configuration setting for whether "blank lines" should be 
spoken with the "Say All" command. If this is off (as it is by default), 
then the above variations would all be read:


"bar
"baz"

--
Benjamin Hawkes-Lewis


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



RE: [WSG] Implication of empty divs

2009-02-09 Thread Paul Collins
Isn't CSS about seperating presentation from content? You apply it once in your 
CSS as opposed to multiple times in your HTML.

In actual fact, if you're only developing for IE6+, Firefox 2+, Webkit 
Browsers, Opera, you only need the overflow:auto; usually.



-Original Message-
From: li...@webstandardsgroup.org [mailto:li...@webstandardsgroup.org] On 
Behalf Of Chris F.A. Johnson
Sent: Monday, February 09, 2009 8:45 AM
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] Implication of empty divs

On Mon, 9 Feb 2009, Benjamin Hawkes-Lewis wrote:

> On 9/2/09 07:45, Chris F.A. Johnson wrote:
>> How can CSS overflow replace ?
>
> See http://www.ejeliot.com/blog/59

  Thanks, but I find the extra DIV no more objectionable than the
  hackery and extra CSS described in that article.

--
Chris F.A. Johnson, webmaster <http://woodbine-gerrard.com>
===
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)


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





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



Re: [WSG] Implication of empty divs

2009-02-09 Thread Chris F.A. Johnson

On Mon, 9 Feb 2009, Benjamin Hawkes-Lewis wrote:


On 9/2/09 07:45, Chris F.A. Johnson wrote:

How can CSS overflow replace ?


See http://www.ejeliot.com/blog/59


 Thanks, but I find the extra DIV no more objectionable than the
 hackery and extra CSS described in that article.

--
   Chris F.A. Johnson, webmaster 
   ===
   Author:
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)


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



Re: [WSG] Implication of empty divs

2009-02-09 Thread Benjamin Hawkes-Lewis

On 9/2/09 07:45, Chris F.A. Johnson wrote:

How can CSS overflow replace ?


See http://www.ejeliot.com/blog/59

--
Benjamin Hawkes-Lewis


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



Re: [WSG] Implication of empty divs

2009-02-08 Thread Chris F.A. Johnson

On Mon, 9 Feb 2009, Gerard Hynes (Gmail) wrote:


I'm all for semantic mark up and removing redunant tags, but the
reality is supporting older browsers and browser quirks complicate
things. So, yes definitely prefer CSS overflow solution, to adding a
redundant/meaningless tag.


   How can CSS overflow replace ?



In the perfect world people would use the latest standards compliant
browsers and keep them regularly updated. Spread the word!

On Mon, Feb 9, 2009 at 12:57 PM, Ben Lau  wrote:

Haha, thanks. But I also do appreciate the long answers though; thanks
Benjamin.

I've read on numerous blogs/tutorials/comments that having blank div is poor
practice, and that it's also poor semantic markup because it's meaningless.

I mention the javascript alternative because i'll be using these empty divs
purely for decorative purposes, so if non-javascript can't see the yellow
block that goes em to the left of my website, I'm not that concerned.
I'm just worried about screen readers picking up that empty div.

So then you guys have no problem in using it for clearing as opposed to
overflow:hidden/auto?

On Mon, Feb 9, 2009 at 1:50 PM, Anthony Ziebell
 wrote:


If you use a tool such as tidy html in xhtml mode it will delete your
empty tags... probably a setting to turn that feature off, but something to
think about...

Cheers,
Anthony.

Gerard Hynes (Gmail) wrote:

My advice below. Cheers, Gerard

On Mon, Feb 9, 2009 at 9:33 AM, Ben Lau  wrote:


Hi all,

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?


I'm not expert about screen readers, but I did run a site I upgraded
through JAWS with some interesting results. The site had alot of
  due to the CMS they were using and JAWS would translate
this to/speak out "blank" which wasn't ideal. Am not sure if it would
do the same for  or  or .



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? Do screen readers pick up javascript
and events?


Javascript solution could work, but I would run your page through a
screen reader first and see if you're happy with the result. You can
download demo of JAWS from
http://www.freedomscientific.com/products/fs/jaws-product-page.asp

You'll probably identify other areas of content that could be improved
for screen readers. He's a good article about the topic
http://www.webaim.org/techniques/screenreader/


--
   Chris F.A. Johnson, webmaster 
   = Do not reply to the From: address; use Reply-To: 
   Author:
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)


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



Re: [WSG] Implication of empty divs

2009-02-08 Thread Gerard Hynes (Gmail)
I'm all for semantic mark up and removing redunant tags, but the
reality is supporting older browsers and browser quirks complicate
things. So, yes definitely prefer CSS overflow solution, to adding a
redundant/meaningless tag.

In the perfect world people would use the latest standards compliant
browsers and keep them regularly updated. Spread the word!



On Mon, Feb 9, 2009 at 12:57 PM, Ben Lau  wrote:
> Haha, thanks. But I also do appreciate the long answers though; thanks
> Benjamin.
>
> I've read on numerous blogs/tutorials/comments that having blank div is poor
> practice, and that it's also poor semantic markup because it's meaningless.
>
> I mention the javascript alternative because i'll be using these empty divs
> purely for decorative purposes, so if non-javascript can't see the yellow
> block that goes em to the left of my website, I'm not that concerned.
> I'm just worried about screen readers picking up that empty div.
>
> So then you guys have no problem in using it for clearing as opposed to
> overflow:hidden/auto?
>
> On Mon, Feb 9, 2009 at 1:50 PM, Anthony Ziebell
>  wrote:
>>
>> If you use a tool such as tidy html in xhtml mode it will delete your
>> empty tags... probably a setting to turn that feature off, but something to
>> think about...
>>
>> Cheers,
>> Anthony.
>>
>> Gerard Hynes (Gmail) wrote:
>>
>> My advice below. Cheers, Gerard
>>
>> On Mon, Feb 9, 2009 at 9:33 AM, Ben Lau  wrote:
>>
>>
>> Hi all,
>>
>> 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?
>>
>>
>> I'm not expert about screen readers, but I did run a site I upgraded
>> through JAWS with some interesting results. The site had alot of
>>   due to the CMS they were using and JAWS would translate
>> this to/speak out "blank" which wasn't ideal. Am not sure if it would
>> do the same for  or  or .
>>
>>
>>
>> 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? Do screen readers pick up javascript
>> and events?
>>
>>
>> Javascript solution could work, but I would run your page through a
>> screen reader first and see if you're happy with the result. You can
>> download demo of JAWS from
>> http://www.freedomscientific.com/products/fs/jaws-product-page.asp
>>
>> You'll probably identify other areas of content that could be improved
>> for screen readers. He's a good article about the topic
>> http://www.webaim.org/techniques/screenreader/
>>
>>
>>
>> Cheers,
>> ben
>>
>> ***
>> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
>> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
>> Help: memberh...@webstandardsgroup.org
>> ***
>>
>>
>> ***
>> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
>> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
>> Help: memberh...@webstandardsgroup.org
>> ***
>>
>>
>>
>>
>> ***
>> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
>> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
>> Help: memberh...@webstandardsgroup.org
>> ***
>
> ***
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: memberh...@webstandardsgroup.org
> ***


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



Re: [WSG] Implication of empty divs

2009-02-08 Thread Ben Lau
Haha, thanks. But I also do appreciate the long answers though; thanks
Benjamin.

I've read on numerous blogs/tutorials/comments that having blank div is poor
practice, and that it's also poor semantic markup because it's meaningless.

I mention the javascript alternative because i'll be using these empty divs
purely for decorative purposes, so if non-javascript can't see the yellow
block that goes em to the left of my website, I'm not that concerned.
I'm just worried about screen readers picking up that empty div.

So then you guys have no problem in using it for clearing as opposed to
overflow:hidden/auto?

On Mon, Feb 9, 2009 at 1:50 PM, Anthony Ziebell  wrote:

>  If you use a tool such as tidy html in xhtml mode it will delete your
> empty tags... probably a setting to turn that feature off, but something to
> think about...
>
> Cheers,
> Anthony.
>
> Gerard Hynes (Gmail) wrote:
>
> My advice below. Cheers, Gerard
>
> On Mon, Feb 9, 2009 at 9:33 AM, Ben Lau  
>  wrote:
>
>
>  Hi all,
>
> 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?
>
>
>  I'm not expert about screen readers, but I did run a site I upgraded
> through JAWS with some interesting results. The site had alot of
>   due to the CMS they were using and JAWS would translate
> this to/speak out "blank" which wasn't ideal. Am not sure if it would
> do the same for  or  or .
>
>
>
>  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? Do screen readers pick up javascript
> and events?
>
>
>  Javascript solution could work, but I would run your page through a
> screen reader first and see if you're happy with the result. You can
> download demo of JAWS 
> fromhttp://www.freedomscientific.com/products/fs/jaws-product-page.asp
>
> You'll probably identify other areas of content that could be improved
> for screen readers. He's a good article about the 
> topichttp://www.webaim.org/techniques/screenreader/
>
>Cheers,
> ben
>
> ***
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: memberh...@webstandardsgroup.org
> ***
>
>
>  ***
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: memberh...@webstandardsgroup.org
> ***
>
>
>
>
>
> ***
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: memberh...@webstandardsgroup.org
> ***
>


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

Re: [WSG] Implication of empty divs

2009-02-08 Thread Anthony Ziebell




If you use a tool such as tidy html in xhtml mode it
will delete your empty tags... probably a setting to turn that feature
off, but something to think about...

Cheers,
Anthony.

Gerard Hynes (Gmail) wrote:

  My advice below. Cheers, Gerard

On Mon, Feb 9, 2009 at 9:33 AM, Ben Lau  wrote:
  
  
Hi all,

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?

  
  
I'm not expert about screen readers, but I did run a site I upgraded
through JAWS with some interesting results. The site had alot of
  due to the CMS they were using and JAWS would translate
this to/speak out "blank" which wasn't ideal. Am not sure if it would
do the same for  or  or .

  
  
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? Do screen readers pick up _javascript_
and events?

  
  
_javascript_ solution could work, but I would run your page through a
screen reader first and see if you're happy with the result. You can
download demo of JAWS from
http://www.freedomscientific.com/products/fs/jaws-product-page.asp

You'll probably identify other areas of content that could be improved
for screen readers. He's a good article about the topic
http://www.webaim.org/techniques/screenreader/

  
  
Cheers,
ben

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

  
  

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


  




***List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfmUnsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfmHelp: memberh...@webstandardsgroup.org***



Re: [WSG] Implication of empty divs

2009-02-08 Thread Gerard Hynes (Gmail)
My advice below. Cheers, Gerard

On Mon, Feb 9, 2009 at 9:33 AM, Ben Lau  wrote:
> Hi all,
>
> 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?

I'm not expert about screen readers, but I did run a site I upgraded
through JAWS with some interesting results. The site had alot of
  due to the CMS they were using and JAWS would translate
this to/speak out "blank" which wasn't ideal. Am not sure if it would
do the same for  or  or .

>
> 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? Do screen readers pick up javascript
> and events?

Javascript solution could work, but I would run your page through a
screen reader first and see if you're happy with the result. You can
download demo of JAWS from
http://www.freedomscientific.com/products/fs/jaws-product-page.asp

You'll probably identify other areas of content that could be improved
for screen readers. He's a good article about the topic
http://www.webaim.org/techniques/screenreader/

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


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



Re: [WSG] Implication of empty divs

2009-02-08 Thread Joseph Taylor
Agreed. An empty div is nothing. Same thing with an empty spans etc... 


Joseph R. B. Taylor
/Designer / Developer/
--
Sites by Joe, LLC
/"Clean, Simple and Elegant Web Design"/
Phone: (609) 335-3076
Fax: (866) 301-8045
Web: http://sitesbyjoe.com
Email: j...@sitesbyjoe.com



Christian Montoya wrote:

On Sun, Feb 8, 2009 at 6:33 PM, Ben Lau  wrote:
  

Hi all,

Are there any (seriously) bad implications of having empty DIVs around your
HTML document?



No.

p.s. ignore all the long-winded answers.

  



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



Re: [WSG] Implication of empty divs

2009-02-08 Thread Andrew Maben

On Feb 8, 2009, at 9:00 PM, Christian Montoya wrote:


On Sun, Feb 8, 2009 at 6:33 PM, Ben Lau  wrote:

Hi all,

Are there any (seriously) bad implications of having empty DIVs  
around your

HTML document?


No.

p.s. ignore all the long-winded answers.


Agreed.


Andrew

http://www.andrewmaben.net
and...@andrewmaben.com

"In a well designed user interface, the user should not need  
instructions."





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

Re: [WSG] Implication of empty divs

2009-02-08 Thread Christian Montoya
On Sun, Feb 8, 2009 at 6:33 PM, Ben Lau  wrote:
> Hi all,
>
> Are there any (seriously) bad implications of having empty DIVs around your
> HTML document?

No.

p.s. ignore all the long-winded answers.

-- 
--
Christian Montoya
mappdev.com :: christianmontoya.net


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



Re: [WSG] Implication of empty divs

2009-02-08 Thread Chris F.A. Johnson

On Mon, 9 Feb 2009, 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.


   I've never used an empty  except with 'clear:both' to force
   the parent element to enclose floated elements. Do you have other
   uses for it?


Apart from adding extra weight and cluttering the document, I understand
screen readers do not pick up divs and spans?

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? Do screen readers pick up javascript
and events?


   What do you want to do that cannot be done without JS?

--
   Chris F.A. Johnson, webmaster 
   = Do not reply to the From: address; use Reply-To: 
   Author:
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)


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



Re: [WSG] Implication of empty divs

2009-02-08 Thread Benjamin Hawkes-Lewis

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
***