[pmwiki-users] 'title' attribute of an HTML link

Waylan Limberg waylan at gmail.com
Wed Jan 11 11:38:42 CST 2006


On 1/11/06, Jean DEMARTINI <jean.d.demartini at wanadoo.fr> wrote:
> Patrick,
>
> The propose syntax is sexy. Two comments:
> - to double-bracket is not an annoying restriction (at least for me it
> is not a restriction at all)
> - having an empty title in a link does not pose any problem (as far as I
> remember my long experience of Web design) even with old browsers. The
> only issue I can imagine is to get an empty bubble and it is not the
> case with recent browsers supporting bubbles (less than 5 years).
>

I concur. If only we could then use:

       [[some page "+"]]

to generate a 'title' which uses the page's 'title'.  Huh? ;-)
Assuming SomePage contains:

       (:title Some cool page:)

then the above link would generate the following html (only relevant
parts shown for clarity):

       <a href='SomePage' title="Some cool page">some page</a>

But perhaps that is wishful thinking.

On 1/11/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> Similarly, I think I might strip the space between a url and
> its title, thus

Yeah, stripping white space at either end (of the url) should be
desired behavior IMHO as long as any whitespace within is left alone -
really easy with php's trim() function.

> Does anyone know if there's an issue with creating empty title=
> attributes in links?  In other words, do browsers have an issue
> with something like:
>
>     <a href='...' title=''>Here is a link</a>

Non that I am aware of. I believe I've even used links like that in
mock-ups before with no ill effects. However, what effect does this
have on html validation?

As an aside, perhaps all internal links could default to use
$Titlespaced for the title attribute unless otherwise specified. Of
course, that would default to $Namespaced (or is it $Name??) when no
page title is given. Then every internal link would always have a
title attribute and the blank title issue would be irrelevant. Then
again, it occurs to me that maybe you need to work out those issues
with the scope of page titles first. And it's possable that some would
be resistant to having a title attribute in every link (although I
have no idea why).

--
----
Waylan Limberg
waylan at gmail.com




More information about the pmwiki-users mailing list