SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Enthusiast dziner's Avatar
    Join Date
    Jun 2004
    Location
    Harrisburg
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Clearly Identifying Target (13.1.1)

    I've been spending the last few weeks re-writing our corporate site by removing many "click here" links which are causing our site to fail the accessibility testing I've been doing with AccVerify software.

    I have a few pages though where there are 2 links on the page that go to the same URL. These seem to fail my accessibility test. I have the following code for each of these links. It seems to me that this should pass, but it does not.

    Code:
    <a href="javascript:return false;" onclick="window.open(redirect('http://www.thesite.com/specialoffers.htm'));return false;" target="_blank">Click here to purchase</a>
    We use this javascript function so that we can track all click-through traffic. Although we probably don't need this since we also use Google Analytics.

    The above link is located in 2 paragraphs on the page in question. But why would this be failing? I am using the same link text "Click here to purchase" in both links and the URL's are the same.

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    It fails because it is duplication like you've just said. Usually links should be unique to prevent cognitive issues or repetition in screen readers.

    For example, you can choose to follow either link:

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. http://www.w3.org/
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. http://www.w3.org/ Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    Though it is still the same destination and link text.

  3. #3
    SitePoint Enthusiast dziner's Avatar
    Join Date
    Jun 2004
    Location
    Harrisburg
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure I follow. Should the link itself be different? Or should the link text be different? I was under the impression that you could have multiple links to the same URL on a page as long as the link text was identical.

    For example. One of our sites has a link for "Contact us" at the top and the bottom of the site which both go to "/contact_us.html". That entire site passes the same accessibility tests. Isn't that the exact same thing that I'm experiencing here but doesn't pass my test?

  4. #4
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Well, in my two above paragraphs they were discussing two different topics but linking to the same place with the same text. So if you don't read the Latin how will you know the difference between the two?

    You cannot wholly trust robots or checkboxes and there is no 13.1.1. in WCAG 1.0: http://www.w3.org/TR/WAI-WEBCONTENT/...ate-navigation

    Quote Originally Posted by http://www.w3.org/TR/WCAG10-HTML-TECHS/#link-text
    If more than one link on a page shares the same link text, all those links should point to the same resource. Such consistency will help page design as well as accessibility.
    Basically the stupid robot wanted you do a manual check since you could have had confusing duplicate link text in close proximity that went to two different places.

  5. #5
    SitePoint Enthusiast dziner's Avatar
    Join Date
    Jun 2004
    Location
    Harrisburg
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The software I use for validation is AccVerify by HiSoftware. In it's results it gave me this error for Priority 2 validation but beside the error it wrote 13.1.1. But I guess it's just 13.1.

    So even though the software failed this page with the 13.1 error. You're saying that I can safely say the page is accessible? The 2 links on my page are an H4, 2 paragraphs, and a list apart from each other. That seems far enough apart to me. It just seems that there is a lack of consistency for this error as some pages pass.

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,826
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    href="javascript: should always fail accessibility rules since the link is broken for those without JavaScript. Links should always link to somewhere.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  7. #7
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    as already noted, javascript links are a fail anyway, as you're not providing a fallback for non-javascript users. there are better techniques to open a new window with javascript

    Code:
    <a href="http://www.thesite.com/specialoffers.htm" onclick="return !(window.open(redirect(this.href)));" target="_blank">Click here to purchase</a>
    but back on the main topic. two links with the same text shouldn't go to different destinations, but - unless i'm missing something - wcag 1.0 doesn't forbid two links with different text going to the same destination (see http://www.w3.org/TR/WCAG10-HTML-TECHS/#link-text). based on your problem description, you're actually doing the latter (two links with different text going to one single page)...which is fine. if your checker tells you otherwise, the checker is wrong.
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  8. #8
    SitePoint Enthusiast dziner's Avatar
    Join Date
    Jun 2004
    Location
    Harrisburg
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe the software validated has a bug. When I run the URL through http://www.contentquality.com/ against Priority 1, 2 it passes. But using HiSoftware's AccVerify software it fails.

    I may need to contact them to see if they can offer any input or maybe this is a bug that needs reported.

  9. #9
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    It is impossible to check accessibility automatically. Any software company telling you that they sell a service which can automatically tell you if a site is accessible is lying. All of these tools are nothing but elaborate syntax validators.

    The only way to verify a site's accessibility, is to manually go through the code. This, of course, presumes that you know what to look for.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  10. #10
    SitePoint Enthusiast dziner's Avatar
    Join Date
    Jun 2004
    Location
    Harrisburg
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I have another link that seems to be failing as well but I see absolutely no reason why it would fail.

    HTML Code:
    <p><a href="http://www.thesite.com/sweepstakes/" target="_blank" title="Sign up for the site Sweepstakes">For details and to enter click here and then look for the sweepstakes button</a></p>
    There are many other links on the page that formatted the exact same way, except some do not have the target or title, and all seem to be fine. I tried removing the target and title and this link still fails my accessibility test. I'm stumped as to what I can change.

  11. #11
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    There is no TARGET attribute for the A element.

    Your link text and structure isn't that good. Why does the user have to click a link, and then look for another link, rather than linking to the page directly? There is no point in using Click Here either. I'm not sure that people will be looking for further details immediately - you can post a link to that from the sign-up page, for those who are interested.

    I would probably write something along the lines of:
    Code html4strict:
    <p><a href="http://www.example.com/sweepstakes/">Sign up for our free sweepstakes!</a></p>
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  12. #12
    SitePoint Enthusiast dziner's Avatar
    Join Date
    Jun 2004
    Location
    Harrisburg
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The web team at my company has little say in what the content is that goes on our site. It's an uphill battle for us. We constantly tell our ad agency to stop using "Click here" for everything. And the content we get from marketing is often the same. Marketing usually asks why they need to re-write everything which is when I come back with "Talk to our lawyers and they'll inform you as to why we need to make our site accessible."

    But I shortened the actual link text and now it passes. Thanks a bunch!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •