[wp-hackers] Tag cloud semantics

Otto otto at ottodestruct.com
Thu Jan 24 22:04:58 GMT 2008


On Jan 24, 2008 2:56 PM, Andy Skelton <skeltoac at gmail.com> wrote:
> If you believe that adding explicit sizes to a tag cloud destroys the
> markup's semantic purity, you should check your premise. Are you
> trying to help the user?

Indirectly, yes. The user is helped by visual cues, however the "user"
is not necessarily a person. It could be an automated system or some
other kind of parser. It could be javascript code in the page itself.
The markup should not be primarily leaned towards the visual aspect
because my "user" may not have eyes.

> You can assist the non-visual reader
> without hurting the experience for the rest of us.

Yes. Because you can make the markup non-visual in nature and then use
CSS to transform that into a visual representation.

> Now I'm going to counter my own argument by providing an example of
> what I believe is the utmost semantic representation of a tag cloud.
> http://skeltoac.com/examples/list2cloud.html

I do like the idea of values being used in LI elements. Good use of
them. Although I'd use a UL. Still...

> Future versions of CSS3 may provide functions to accomplish the same
> thing, but that could be ten years away.

No need for CSS3. CSS2 can do it (with attribute selectors), but
current browsers mostly can't handle it.

Like this:
li[value="25"] { font-size: 125% }

Try it. That works in Firefox, probably IE7 too.


More information about the wp-hackers mailing list