HighDots Forums  

Bad? Or not? (But I think I already know...)

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Bad? Or not? (But I think I already know...) in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
The Plankmeister
 
Posts: n/a

Default Bad? Or not? (But I think I already know...) - 10-15-2003 , 01:30 PM






Is doing this bad:

<h3>Some title or other...<a href="#pagetop">back to top</a></h3>

I have a feeling it is... My problem is I'm using CSS to style the H3 into a
block that spans the whole containing element. I would like the <a> to
appear next to the title, but I'm sure this is bad practice (for screen
readers and heading-level navigation etc etc)

So... is it acceptable to do this:

<span><h3>Some title or other...</h3><a href="#pagetop">back to
top</a></span>

Or does nesting the <h3> in a <span> do something horrible to the document
structure?

Comments, please!

P.





Reply With Quote
  #2  
Old   
Peter Foti
 
Posts: n/a

Default Re: Bad? Or not? (But I think I already know...) - 10-15-2003 , 02:08 PM






"The Plankmeister" <plankmeister_NOSPAM_ (AT) hotmail (DOT) com> wrote

Quote:
Is doing this bad:

h3>Some title or other...<a href="#pagetop">back to top</a></h3

I have a feeling it is... My problem is I'm using CSS to style the H3 into
a
block that spans the whole containing element. I would like the <a> to
appear next to the title, but I'm sure this is bad practice (for screen
readers and heading-level navigation etc etc)

So... is it acceptable to do this:

span><h3>Some title or other...</h3><a href="#pagetop">back to
top</a></span
I haven't confirmed this in the spec, but I think <h3> is NOT an inline
element, so using span would be incorrect. A better solution might be:

<div class="myheading3">
<h3>Hello World</h3>
<a href="#pagetop" class="toplink">back to top</a>
</div>

Putting the <a> in the <h3> is most likely incorrect semantics.
Hope this helps.
Regards,
Peter Foti




Reply With Quote
  #3  
Old   
Samuël van Laere
 
Posts: n/a

Default Re: Bad? Or not? (But I think I already know...) - 10-15-2003 , 04:23 PM



"The Plankmeister" <plankmeister_NOSPAM_ (AT) hotmail (DOT) com> schreef in bericht
news:3f8d923a$0$45370$edfadb0f (AT) dread11 (DOT) news.tele.dk...
Quote:
Is doing this bad:

h3>Some title or other...<a href="#pagetop">back to top</a></h3

I have a feeling it is... My problem is I'm using CSS to style the H3 into
a
block that spans the whole containing element. I would like the <a> to
appear next to the title, but I'm sure this is bad practice (for screen
readers and heading-level navigation etc etc)

So... is it acceptable to do this:

span><h3>Some title or other...</h3><a href="#pagetop">back to
top</a></span

Or does nesting the <h3> in a <span> do something horrible to the document
structure?

Comments, please!

P.

<h3><span>Some title or other...</span></h3>
<a href="#pagetop">back to top</a>

Or is this not what you want?


--
With regards,
Samuël van Laere
the Netherlands
http://samuel.phpindex.nl





Reply With Quote
  #4  
Old   
Jonathan Snook
 
Posts: n/a

Default Re: Bad? Or not? (But I think I already know...) - 10-15-2003 , 06:33 PM



"The Plankmeister" <plankmeister_NOSPAM_ (AT) hotmail (DOT) com> wrote

Quote:
Is doing this bad:

h3>Some title or other...<a href="#pagetop">back to top</a></h3
How about removing the "back to top" altogether? Most user agents support a
way to return to the top of the page with ease.

Jonathan


--
http://www.snook.ca/




Reply With Quote
  #5  
Old   
Salagir
 
Posts: n/a

Default Re: Bad? Or not? (But I think I already know...) - 10-16-2003 , 03:18 AM



On Wed, 15 Oct 2003 23:33:40 GMT, in comp.infosystems.www.authoring.html,
Jonathan Snook wrote:
Quote:
Is doing this bad:
h3>Some title or other...<a href="#pagetop">back to top</a></h3
How about removing the "back to top" altogether? Most user agents support a
way to return to the top of the page with ease.
Yeah, did everyone forgot what the "home" key is for ?

I've never understood theses website with links to places where we can
easily go by ourselves: "back" links with a javascript:history(-1),
"top" links like this one, etc..

(followup to authoring.html, no stylesheets here)
--
++++++++ Zelda, Dragon Ball, Mana and my (art)work at www.salagir.com ++++++++
Pas de violence, c'est les vacances !


Reply With Quote
  #6  
Old   
Philipp Lenssen
 
Posts: n/a

Default Re: Bad? Or not? (But I think I already know...) - 10-16-2003 , 09:42 AM



The Plankmeister wrote:

Quote:
Is doing this bad:



span><h3>Some title or other...</h3><a href="#pagetop">back to
top</a></span

"Back to top" links don't make sense in the context of HTML. They are
especially worse inside a heading, but that's just on top. So yes it's
sort of bad, if you care about HTML, accessibility, usability etc.

--
Google Blogoscoped
http://blog.outer-court.com


Reply With Quote
  #7  
Old   
The Plankmeister
 
Posts: n/a

Default Re: Bad? Or not? (But I think I already know...) - 10-16-2003 , 01:41 PM



Quote:
"Back to top" links don't make sense in the context of HTML. They are
especially worse inside a heading, but that's just on top. So yes it's
sort of bad, if you care about HTML, accessibility, usability etc.
With that in mind... I'll get rid of it. As somebody said... "Use the home
key!"




Reply With Quote
  #8  
Old   
CJM
 
Posts: n/a

Default Re: Bad? Or not? (But I think I already know...) - 10-20-2003 , 10:24 AM



I dont want to come across as daft here, but I think I am missing something
in this thread...

I've followed the various arguments and I've come to a definate conclusion
that it is more comfortable on the fence! I didnt spot a clear winner.

Regardless, one thing that puzzles me is the 'Home key' issue. The only Home
key I have on my UA is the one that returns me to my homepage. Yet from this
thread, I'm expecting to find a key that takes me to the top of the current
page... but I dont. There is of course the Refresh key, but that isn't a
suitable substitute - it would play havoc with some ASP/PHP pages, and some
other pages too.

I'm not sure if I've misunderstood the question or the answers....!

Cheers

Chris

"The Plankmeister" <plankmeister_NOSPAM_ (AT) hotmail (DOT) com> wrote

Quote:
"Back to top" links don't make sense in the context of HTML. They are
especially worse inside a heading, but that's just on top. So yes it's
sort of bad, if you care about HTML, accessibility, usability etc.

With that in mind... I'll get rid of it. As somebody said... "Use the home
key!"





Reply With Quote
  #9  
Old   
Matthias Gutfeldt
 
Posts: n/a

Default Re: Bad? Or not? (But I think I already know...) - 10-20-2003 , 10:33 AM



CJM wrote:
Quote:
Regardless, one thing that puzzles me is the 'Home key' issue. The only Home
key I have on my UA is the one that returns me to my homepage.
It's not the UA we're talking about, it's a much simpler feature:

The "Home" key on your keyboard.

It works exactly like the "End" key, just the other way round. And
there's also PgUp and PgDown keys to jump one page (more or less) up or
down, respectively.

Amazing, isn't it?


Matthias



Reply With Quote
  #10  
Old   
Philipp Lenssen
 
Posts: n/a

Default Re: Bad? Or not? (But I think I already know...) - 10-20-2003 , 10:37 AM



CJM wrote:

Quote:
Regardless, one thing that puzzles me is the 'Home key' issue. The
only Home key I have on my UA is the one that returns me to my
homepage. Yet from this thread, I'm expecting to find a key that
takes me to the top of the current page... but I dont.
When I want to be taken to the top of the page in my browser* I press
Strg+Pos1, which I believe translates to Ctrl+Home on US-keyboards.

Just pressing "Pos1" takes me to the beginning of a line. Ctrl + <-
(left-arrow) takes me to the beginning of the last word.

*This shortcut also works in my text-editor, in Word-Documents, in the
current Window I'm typing in, and so on. It's a standardized GUI
feature on my Windows machine. Speficially it works in all applications
regardless of whether there's "To top of page" buttons, which seems
this makes it a shortcut helpful to know about.

--
Google Blogoscoped
http://blog.outer-court.com


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.