W3C home > Mailing lists > Public > w3c-wai-gl@w3.org > July to September 2004

RE: A question on bypassing a group of links - IE work around

From: Jim Thatcher <jtcom@jimthatcher.com>
Date: Fri, 9 Jul 2004 15:21:27 -0500
To: <Becky_Gibson@notesdev.ibm.com>, "'Web Content Guidelines'" <w3c-wai-gl@w3.org>
Cc: "'James Craig'" <wai-wg@cookiecrook.com>
Message-ID: <001001c465f2$56c13490$7300470a@THINKPAD04>
Becky, 

 

Brilliant! I had noticed the use of a div with id="content" that James
pointed out, and downloaded http://westciv.com specifically to change that
id that thinking that it had something to do with the fact that their skip
link worked from the keyboard. It was then that I discovered and was baffled
by the fact that the skip link worked with the style sheet invoked and not
without it. Now both mysteries are solved - Mozilla's strange handling of
westciv.com (which James pointed out is not strange at all, but correct) and
why the behavior is different with and without the style sheet.

 

I was just writing the phrase, "fixed width" that you suggested and I
decided to try not fixed, but some default "width" - remember one repair is
to put the anchor in a table cell which by default has width associated with
it. So I tried <span style="width:100%"><A name="content1"></A></span> and
that works too. That may be using markup NOT as intended, but it is much
less of a hack than creating a table just to hold the anchor (as at
http://webaim.org <http://webaim.org/> ). 

 

So there is now a new technique to overcome IE's bug for in-page links: make
sure the bookmark anchor is contained in some element with width specified.
Does anyone have any idea why that would make input focus for in-page
(bookmark) links work correctly in IE?

 

Jim  

 

-----Original Message-----
From: w3c-wai-gl-request@w3.org [mailto:w3c-wai-gl-request@w3.org] On Behalf
Of Becky_Gibson@notesdev.ibm.com
Sent: Friday, July 09, 2004 2:35 PM
To: Web Content Guidelines
Cc: Jim Thatcher
Subject: RE: A question on bypassing a group of links - IE work around

 


Jim Thatcher: <quote> 
The most common skip link technique is providing a link to an empty named
anchor <a name="content"><a> or <a id="content"><a> or even <a id="content"
/>. That technique does NOT work in IE6 with the keyboard as one of the
first skip links at  <http://wwww.acb.org/> http://wwww.acb.org illustrates.
(Remember to tab one
more time after executing the skip link.) However I have come up with a
counter example to that statement.  <http://westciv.com/> http://westciv.com
has a visible skip
link at the top of the page. The target is an empty anchor. It works from
the keyboard. To make matters worse, when I saved westciv.com locally
without their style sheet, the skip link did not work with the keyboard -
which I would predict. When I downloaded the style sheet and attached it -
the skip link did work - which baffles me. This is a mystery to me and if
anyone can figure it out - I would love to here. 
</quote> 

Becky: 
I previously responded to this post with some observations about the westciv
example that Jim references above. See Becky_Gibson@notesdev.ibm.com:
<http://lists.w3.org/Archives/Public/w3c-wai-gl/2004JulSep/0104.html>  "RE:
A question on bypassing a group of links"  for the gory details.   I now
have a better explanation: 
It seems if you add an element  with a width style around the named anchor
tag it will work correctly in IE.  The attached example that I modified from
one on Jim Thatcher's site ( <http://jimthatcher.com/skipnav1.htm>
http://jimthatcher.com/skipnav1.htm) WILL work in IE 6.  The key is to wrap
the named anchor in an element that has a width specified.  I used a span
but a div also works. In the attached file the skip link is:  <A
href="#content1">Skip to named  anchor</A> 
The named anchor  that works correctly is: <span style="width:500px;"><A
name="content1"></A>Target of the first skip link is immediately before this
text.</span> 

If I remove the style="width:500px" from the span, the IE bug raises its
ugly head.  With the style="width:500px" on the span, the skip nav works
properly - go figure! 

The skip link in the attached file was tested and works correctly in IE 6,
Mozilla 1.6, JAWS 4.51, Window Eyes 4.5 sp3, and HPR 3.04 (beta). 



-becky 







Becky Gibson
Web Accessibility Architect
                                                      
IBM Emerging Internet Technologies
5 Technology Park Drive
Westford, MA 01886
Voice: 978 399-6101; t/l 333-6101
Email:  <mailto:gibsonb@us.ibm.com> gibsonb@us.ibm.com
Received on Friday, 9 July 2004 16:21:59 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:17:58 UTC