WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: empty anchor tags

for

Number of posts in this thread: 6 (In chronological order)

From: Angela French
Date: Thu, Feb 23 2012 2:36PM
Subject: empty anchor tags
No previous message | Next message →

A new software tool to find broken links site wide has identified many empty anchor tags on my site like this:
<a href=""></a> or <a href="">&nbsps</a>. Can anyone tell me what accessibility issues these may present, or usability issues for those who use AT?

Thanks,


Angela French
Internet Specialist
State Board for Community and Technical Colleges
360-704-4316
= EMAIL ADDRESS REMOVED =
http://www.checkoutacollege.com/

From: Birkir R. Gunnarsson
Date: Thu, Feb 23 2012 2:42PM
Subject: Re: empty anchor tags
← Previous message | Next message →

Hi Angela

Out of curiosity, what do you use the empty anchor tags for on the website?
May be, if they are purely visual in nature and unnecessary for screen
reader users you could hide them with aria-hidden (see John Foliet's
blogpost from a few days back).
Though it could be argued that hiding website elements from a user
group is a slippery slope of dealing with accessibility issues.


On 2/23/12, Jared Smith < = EMAIL ADDRESS REMOVED = > wrote:
> Empty links will usually show up in the links list and will be
> navigable by the keyboard, but nothing will be visible or read by a
> screen reader (most simply read "link") when they are navigated to.
> Empty links should most certainly be removed.
>
> Jared
>

From: Jared Smith
Date: Thu, Feb 23 2012 2:48PM
Subject: Re: empty anchor tags
← Previous message | Next message →

Empty links will usually show up in the links list and will be
navigable by the keyboard, but nothing will be visible or read by a
screen reader (most simply read "link") when they are navigated to.
Empty links should most certainly be removed.

Jared

From: Tony Olivero
Date: Thu, Feb 23 2012 2:54PM
Subject: Re: empty anchor tags
← Previous message | Next message →

It may also be that these links are used to trigger JavaScript functions. I
have seen cases of background CSS being used to display an image, and an
empty anchor is in the actual HTML code to trigger the function.

As Jared stated, these empty anchors should be removed, but if it is the
case that they are being used to trigger JS calls, you will need to ensure
an accessible replacement in the page content.

Tony

From: Angela French
Date: Fri, Feb 24 2012 11:06AM
Subject: Re: empty anchor tags
← Previous message | Next message →

These particular empty tags exist in code that I inherited. I'm testing their removal now. Thank you for the feedback.
Angela French

>
>It may also be that these links are used to trigger JavaScript functions. I have
>seen cases of background CSS being used to display an image, and an empty
>anchor is in the actual HTML code to trigger the function.
>
>As Jared stated, these empty anchors should be removed, but if it is the case
>that they are being used to trigger JS calls, you will need to ensure an
>accessible replacement in the page content.
>
>Tony
>
>

From: Jason Megginson
Date: Fri, Feb 24 2012 11:36AM
Subject: Re: empty anchor tags
← Previous message | No next message

Exactly. Another problem to note with this implementation is that if a
user disables colors via the browser's accessibility settings (IE and FF),
the CSS background images will not be visible to the user virtually
removing the anchors from view.

Jason Megginson
SSB BART Group
703-637-8964 (o)
703-244-7755 (c)