WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Empty tags (divs, p and strong) in the code?

for

From: Ramya Sethuraman
Date: Aug 17, 2012 10:44AM


Would aria-hidden make sense in this case?

On Fri, Aug 17, 2012 at 12:36 PM, Bryan Garaventa <
<EMAIL REMOVED> > wrote:

> That is a grey area, in that headings are pseudo active in that you can use
> 'h' and 'shift+h' to navigate to them, even if they are empty.
>
> The use of role=presentation should prevent this from occurring however.
>
> ----- Original Message -----
> From: "Ramya Sethuraman" < <EMAIL REMOVED> >
> To: "WebAIM Discussion List" < <EMAIL REMOVED> >
> Sent: Friday, August 17, 2012 9:21 AM
> Subject: Re: [WebAIM] Empty tags (divs, p and strong) in the code?
>
>
> > Interesting. Would an empty header cause a problem?
> >
> >
> > On Fri, Aug 17, 2012 at 12:20 PM, Bryan Garaventa <
> > <EMAIL REMOVED> > wrote:
> >
> >> 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">&nbsp;</div>
> >> >> This class is used to have a decorative horizontal line.
> >> >>
> >> >> - <strong></strong>
> >> >> - <p>&#160;</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 &nbsp;.
> >> >>
> >> >> Thank you,
> >> >> Rabab
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> > >> >> > >> >> > >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > > >> > > >> > > >>
> >> > >> > >> > >>
> >
> >
> >
> > --
> > *I also exist @: http://www.ramyasethuraman.com*
> > > > > > >
> > > >



--
*I also exist @: http://www.ramyasethuraman.com*