E-mail List Archives
Re: Empty tags (divs, p and strong) in the code?
From: Bryan Garaventa
Date: Aug 17, 2012 10:20AM
- Next message: Ramya Sethuraman: "Re: Empty tags (divs, p and strong) in the code?"
- Previous message: Heidi Jungel: "JAWS/NVDA ordered lists on IE 8 and 9"
- Next message in Thread: Ramya Sethuraman: "Re: Empty tags (divs, p and strong) in the code?"
- Previous message in Thread: Ramya Sethuraman: "Re: Empty tags (divs, p and strong) in the code?"
- View all messages in this Thread
There's no need, empty static elements have no accessibility issues.
The problem with empty tags is in regard to active elements like links,
where feedback is necessary to convey the meaning of the element. Decorative
tags like lines or spacer images have no value for screen reader users, so
are best ignored.
One exception to this is when you use an empty element like a div tag that
uses a background image to convey meaning, like an arrow to convey that
clicking the image will navigate somewhere else. ARIA can then be used to
make this accessible with the correct event handlers attached.
----- Original Message -----
From: "Ramya Sethuraman" < <EMAIL REMOVED> >
To: "WebAIM Discussion List" < <EMAIL REMOVED> >
Sent: Friday, August 17, 2012 9:12 AM
Subject: Re: [WebAIM] Empty tags (divs, p and strong) in the code?
> Would it make sense to use a role="presentation" on these elements?
>
> On Fri, Aug 17, 2012 at 11:56 AM, Rabab Gomaa
> < <EMAIL REMOVED> >wrote:
>
>> Hello,
>>
>> I am wondering if using empty tags can cause any accessibility failures.
>> Example:
>> - <div class="hrline"> </div>
>> This class is used to have a decorative horizontal line.
>>
>> - <strong></strong>
>> - <p> </p>
>> This is sometimes a miss during markup.
>>
>> I searched in the archived and found an older post about empty anchors
>> http://webaim.org/discussion/mail_thread?threadQ72 but my question is
>> about divs, p and strong elements with or without spaces like .
>>
>> Thank you,
>> Rabab
>>
>>
>>
>>
>> >> >> >>
>>
>
>
> --
> > >
- Next message: Ramya Sethuraman: "Re: Empty tags (divs, p and strong) in the code?"
- Previous message: Heidi Jungel: "JAWS/NVDA ordered lists on IE 8 and 9"
- Next message in Thread: Ramya Sethuraman: "Re: Empty tags (divs, p and strong) in the code?"
- Previous message in Thread: Ramya Sethuraman: "Re: Empty tags (divs, p and strong) in the code?"
- View all messages in this Thread