SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    May 2005
    Posts
    248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    links, title attributes -- how to display

    Hi,
    I would like to have the title attribute (is that the right word?) appear when the user hovers over the link. Also it would be great if the link was "pretty."

    Code HTML4Strict:
    <li id="menu-item-49" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-49"><a href="http://meadowcreekhome.net/trials">Trials</a></li>

    Is this possible to have the code be: <a href="http://meadowcreekhome.net/trials" title="Trials">Trials</a>?
    It's important to me that accessibility be as present as possible.
    thanks

  2. #2
    SitePoint Zealot
    Join Date
    Dec 2007
    Posts
    157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can you code?

  3. #3
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,888
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by marioo View Post
    Hi,
    I would like to have the title attribute (is that the right word?) appear when the user hovers over the link. Also it would be great if the link was "pretty."

    Code HTML4Strict:
    <li id="menu-item-49" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-49"><a href="http://meadowcreekhome.net/trials">Trials</a></li>

    Is this possible to have the code be: <a href="http://meadowcreekhome.net/trials" title="Trials">Trials</a>?
    It's important to me that accessibility be as present as possible.
    thanks
    Without going into the nuts and bolts of how to get Wordpress to do that, a couple of thoughts.

    1. Any "pretty" hover notes are almost certainly Javascript-driven, and so are less likely to be accessible than if you just use a plain regular tooltip. They're also more likely to slow down people's computers and introduce lag and latency, which degrades the browsing experience – it really isn't worth doing that just to get a prettified tooltip.

    2. While using the title attribute to provide more information can be useful, it isn't a particularly accessible feature. Lots of AT won't read the title attribute out. Lots of people using ordinary browsers will be unaware that there's a tooltip there, as they probably aren't in the habit of hovering over links for a second or so before clicking on them – they just line the cursor up and fire. So putting important information in the title attribute is a good way of making sure that most people don't see it.

    3. If you are going to use the title attribute, use it for something worthwhile. And that doesn't include simply repeating the link text (eg title="Trials"). Or turning nice concise link text into waffling drivel (eg title="Click here to find out more about trials!"). That's just a waste of everyone's time, including yours.

    Of course, if you think about points 2 and 3 together, it gets harder to see a good use-case for the title attribute on links at all. Any time where it would be useful to have additional information, you're going to want more than a handful of people to see it, so you probably need to have that information visible on the screen rather than rely on people spotting and reading the tooltip.

  4. #4
    SitePoint Addict
    Join Date
    May 2005
    Posts
    248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Stevie D.,
    thank you for the information -- good to think about.
    By pretty, I was referring to "<li id="menu-item-49" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-49"><" part of the HTML, not making the hover fancy. Have it be somethink like
    <li id="something prettier"><a href="the link">I'm the link</a></li>, changing the id to something else. Thoughts?
    #3 - well put
    thanks again

    wellyfish: my coding is OK, HTML, CSS, JavaScript -- all better than PHP, some of which I do know.
    What are you thinking?
    thanks


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
  •