Re: Namespace

Robert Burns wrote:
> Earlier you gave the example of changing something like <small>or
> perhaps</small> to  <span class="small"> or perhaps <span>. However,
> that's not the kind of change that would represent best practice. Best
> practice would be to replace the presentational element with something
> more meaningful. I think <span> and <div> both encourage those
> practices.

<span> and <div> are presentational hooks, so I don't see how using them
is not using presentational elements.

> So instead, one would expect a change from using <small> to
> something like <span class="copyright"> Copyright 2007<span> or to <span
> class="disclaimer"> <span>. These are the types of  meaningful class
> names that often accompany <span> and <div>

"Meaningful class name" is oxymoronic, as far as UAs go, and I assume
you're not suggesting that everyone reads HTML in source form.  A class
name is an opaque string of text; "small" is no less meaningful than
"copyright", or "fribblewibblewobble" for that matter.  Replacing a
presentational element with e.g. span/div, AFAICS, leaves you with
something no more meaningful than what you had originally.

> Of course those class names
> could accompany <small>, but why use them on an element that comes with
> presentational baggage.

I fear you're misreprepresenting reality; span and div tags are actually
just presentational hooks in the real world.  They are the ultimate in
presentational baggage: everything about them screams "I am a styling
hook".  A screen reader encountering <small> could do something with it,
but one encountering a generic <span> or <div> tag could not.  (I'm
ignoring Aural CSS here, granted, but I got the impression that
screenreaders tend to ignore it too.)

> Also, I think it supports authoring system that simply neglect to add
> meaningful class names to elements such as <small>

Andrew Sidwell

Received on Wednesday, 18 July 2007 08:33:15 UTC