[wp-hackers] Tag cloud semantics
Otto
otto at ottodestruct.com
Thu Jan 24 21:54:06 GMT 2008
On Jan 24, 2008 3:41 PM, Jeremy Clarke <jer at simianuprising.com> wrote:
> At the risk of being a blowhard by stating the obvious, I thought the
> point of separation of style and content was to write less markup and
> be as compatible as possible.
No, in fact, that's not the point of semantic markup at all. The point
is to make the markup have actual inherent meaning beyond the
displaying of the content.
If I write <b>bolded text</b>, then that's less meaningful than
<strong>bolded text</strong>. The b tag is describing how to display
the text, the strong tag is assigning a meaning to that text, that it
should be strongly emphasized and, to some degree, is more important
than the other text. Even though they display the same (by default),
the b is not semantic, the strong is.
If I define a div with a class, then that class should be meaningful
in and of itself. I'm marking that entire division of content as some
type of thing. That thing should not be layout related, it should be
content related. If I say that a div holds my sidebar content, then
the sidebar doesn't necessarily have to be on the side of the page. It
can be anywhere, the point is that that content is fundamentally
different from, say, my posts (which are often called "content" in
div's). Ideally, you'd only mark divs up based on the content. Sadly,
browsers sometimes require us to use a bit more of them than required
for layout reasons.
But the idea is that everything in the XHTML should be descriptive of
ONLY what is in the XHTML. It doesn't depend on any outside thing.
Sure, you can use CSS to display it in different ways (and I do just
that on my site with extra print.css and handheld.css files), but the
markup itself should be describing the content it surrounds, not how
to display it or how to do anything else with it.
> In this case the least markup required is DEFINITELY with the
> non-semantic solution, and as Andy said, there is really no risk to
> actual users (disabled or otherwise) that isn't at least as bad as the
> wonky CSS hacks being proposed to make it 'semantic'.
These "hacks" are not wonky. They're the whole point. You want to
describe the content itself. How you actually display that content
should not be in the XHTML at all.
> Most importantly, this is definitely not worth breaking any templates
> over! If a semantic version of the cloud is added it should be by
> making it an option inside wp_generate_tag_cloud(), or else adding a
> whole new function and letting the hardcore designers use that
> instead.
I'm all for backward compatibility, just allow me to specify some
option to remove the idiotic style tags entirely and use proper CSS
classes. I don't really care if they are the default options for the
function or not, although they darn well should be, IMO.
-Otto
More information about the wp-hackers
mailing list