Links, title attributes -- how to display

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.” :slight_smile:

<li id="menu-item-49" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-49"><a href="">Trials</a></li>

Is this possible to have the code be: <a href=““Trials”>Trials</a>?
It’s important to me that accessibility be as present as possible.

can you code?

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.

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?