Re: [WSG] Linking to top of page
At 03:34 PM 2/28/2006, Hill, Tim wrote: a href=#Back to Top/a Is there an issue with using this for screenreaders? Wouldn't they activate this link and nothing would happen? Does this work effectively across browsers to scroll the page to the top though? I've found it works on firefox, ie, opera on PC (winXP). Wouldn't activating the link in a screen-reader simply move the cursor (reading point) from the link to the beginning of the page? Curiously, Paul ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
[WSG] Linking to top of page
What is the recommended way for linking back to the top of the page? I can't link to the id of my H1 because of my CSS. The name attribute of the A tag is deprecated/removed[1]. And while some people might say use the scrollbar or press Home I'm wondering if anyone has experimented with these: 1) Giving my BODY id=top and linking to that seems to work but might not be widely supported. 2) Linking to the undefined href=# seems to be easiest, but is semantically ambiguous and might have usability and browser support issues. 3) The obvious thing is using an empty DIV or SPAN with id=top but empty tags seem like an ugly solution. So what does conventional wisdom say is best? Alternately, which is most correct from a standards perspective? Thanks! --Curby [1] http://www.w3.org/TR/xhtml11/changes.html#a_changes ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Linking to top of page
Curby wrote: What is the recommended way for linking back to the top of the page? I can't link to the id of my H1 because of my CSS. The name attribute of the A tag is deprecated/removed[1]. ... [1] http://www.w3.org/TR/xhtml11/changes.html#a_changes It's only deprecated in XHTML 1.1, which you almost certainly shouldn't be using anyway since it's really not supposed to be served as text/html. If you really want to jump on the XHTML bandwagon, stick with XHTML 1.0. And while some people might say use the scrollbar or press Home That's always possible and why I never bother with back-to-top links. 1) Giving my BODY id=top and linking to that seems to work but might not be widely supported. I'm not aware of any browser that doesn't support it, though it's possible some older browsers may choke on it. If you use a container element around the whole content, you could use that instead: body div id=container ... content ... a href=#containertop/a /div /body -- Lachlan Hunt http://lachy.id.au/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Linking to top of page
At 05:35 AM 2/27/2006, Curby wrote: What is the recommended way for linking back to the top of the page? I can't link to the id of my H1 because of my CSS. Whoa. Stop right there. How can CSS stop you from linking to an h1 that's got an id? Paul ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Linking to top of page
Curby wrote: What is the recommended way for linking back to the top of the page? I can't link to the id of my H1 because of my CSS. The name attribute of the A tag is deprecated/removed[1]. And while some people might say use the scrollbar or press Home I'm wondering if anyone has experimented with these: Why not use h1 id=foo? (You say because of your CSS, but what does this mean?) Then link to mypage.htm#foo - all legit and above board Seems to work for most people :) Cheers Ian -- _ zStudio - Web development and accessibility http://zStudio.co.uk Snippetz.net - Online code library File, manage and re-use your code snippets links http://snippetz.net ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Linking to top of page
Paul Novitski wrote: At 05:35 AM 2/27/2006, Curby wrote: What is the recommended way for linking back to the top of the page? I can't link to the id of my H1 because of my CSS. Whoa. Stop right there. How can CSS stop you from linking to an h1 that's got an id? It depends where the H1 is positioned. If it's not at the top, the page won't be scrolled to the top. -- Lachlan Hunt http://lachy.id.au/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Linking to top of page
a href=#Back to Top/a On 27/02/06, Lachlan Hunt [EMAIL PROTECTED] wrote: Paul Novitski wrote: At 05:35 AM 2/27/2006, Curby wrote: What is the recommended way for linking back to the top of the page? I can't link to the id of my H1 because of my CSS. Whoa. Stop right there. How can CSS stop you from linking to an h1 that's got an id? It depends where the H1 is positioned. If it's not at the top, the page won't be scrolled to the top. -- Lachlan Hunt http://lachy.id.au/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Linking to top of page
Lachlan Hunt wrote: It depends where the H1 is positioned. If it's not at the top, the page won't be scrolled to the top. If the H1 isn't at the top of the content, then I'd say there's a pretty good case for saying that the H1 is in the wrong place. The top of the content is where it should go, not the top of all the nav and other guff that may be on the page as well, in my opinion. Cheers Ian -- _ zStudio - Web development and accessibility http://zStudio.co.uk Snippetz.net - Online code library File, manage and re-use your code snippets links http://snippetz.net ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Linking to top of page
On 2/27/06, Ian Anderson [EMAIL PROTECTED] wrote: Lachlan Hunt wrote: It depends where the H1 is positioned. If it's not at the top, the page won't be scrolled to the top. If the H1 isn't at the top of the content, then I'd say there's a pretty good case for saying that the H1 is in the wrong place. The top of the content is where it should go, not the top of all the nav and other guff that may be on the page as well, in my opinion. Lachlan is right, I use image replacement to reposition and stick an image in the upper-lefthand corner of the viewport instead of the normal H1 text. It stays visible in the corner for compatible browsers. Example: http://curby.net/doc/layout/jello-new.html (Link may die in the future) Hmm... so id-ing and linking to the body might work, otherwise it seems the concensus is to just use an empty anchor/div/span with an id/name. Thanks for all the input. =) --Curby ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Linking to top of page
Curby wrote: Lachlan is right, I use image replacement to reposition and stick an image in the upper-lefthand corner of the viewport instead of the normal H1 text. It stays visible in the corner for compatible browsers. Example: http://curby.net/doc/layout/jello-new.html Sorry to disagree but looking at your code, you should be using #content as the back to top anchor destination. Your use of a decorative graphic element on the left edge is irrelevant to the issue. Hope this helps Cheers ian -- _ zStudio - Web development and accessibility http://zStudio.co.uk Snippetz.net - Online code library File, manage and re-use your code snippets links http://snippetz.net ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Linking to top of page
Ian Anderson wrote: Lachlan Hunt wrote: It depends where the H1 is positioned. If it's not at the top, the page won't be scrolled to the top. If the H1 isn't at the top of the content, then I'd say there's a pretty good case for saying that the H1 is in the wrong place. I meant not at the top of the rendered view. i.e. It's been positioned using CSS. Try this simple test case: !DOCTYPE html style#foo { margin: 100px 0 1000px; }/style h1 id=fooHello/h1 a href=#footop/a -- Lachlan Hunt http://lachy.id.au/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Linking to top of page
On 2/27/06, Ian Anderson [EMAIL PROTECTED] wrote: Curby wrote: Lachlan is right, I use image replacement to reposition and stick an image in the upper-lefthand corner of the viewport instead of the normal H1 text. It stays visible in the corner for compatible browsers. Example: http://curby.net/doc/layout/jello-new.html Sorry to disagree but looking at your code, you should be using #content as the back to top anchor destination. Your use of a decorative graphic element on the left edge is irrelevant to the issue. It is relevant insofar as it makes the header unusable for a go-to-top link, and I was explaining to those who at first didn't understand my admittedly cryptic comment about CSS breaking that functionality. I'd like to go to the very top so perhaps #content wouldn't be good for a go to top link, but I can probably use one of those existing ID-ed divs. And I just realized I don't have a skip to content link for text views... will have to think about adding that in. Thanks everyone for your help. =) --Curby ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **