These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:06 pm Advanced search

overload of class attribute?

Do you think the HTML spec should do something differently? You can discuss spec feedback here, but you should send it to the WHATWG mailing list or file a bug in the W3C bugzilla for it to be considered.

overload of class attribute?

Postby adrienne » Wed Apr 11, 2007 4:50 pm

I know this topic has been raised in several places around the web, but i can't find anyone on the mailing list archive speaking to it (this may be a reflection of my searching rather than of anything else).

Is it really a good idea to overload class with structured content? What do you all think of the W3C's very similar proposal to structure content, using the new proposed role attribute?

I think that having a new enumerated attribute seems like a WAY better idea than overloading an attribute that people are already using for a number of other things.

Just hoping to get a discussion started somewhere about this!

Thanks,
Adrienne Leigh Travis
adrienne
<h6>
 
Posts: 3
Joined: Wed Apr 11, 2007 4:43 pm

Blame object oriented scripting languages

Postby wgabrie » Wed Apr 11, 2007 9:01 pm

You can blame object oriented scripting languages (Javascript, PHP, ... ) for this trend. A class (or role) can be used for style and/or give meaning to the content. The alternative is to add more tags.
wgabrie
<h4>
 
Posts: 25
Joined: Thu Apr 05, 2007 8:55 pm

Postby adrienne » Thu Apr 12, 2007 2:29 pm

But it doesn't have to be a new tag -- just a new attribute, 'role' or similar. (The W3C's new initiative is using role, that's why i'm using it for my example.

So for instance, my paragraph might look like this:

Code: Select all
<p class="someclass" role="address">Text</p>


See? No overloading.
adrienne
<h6>
 
Posts: 3
Joined: Wed Apr 11, 2007 4:43 pm

W3's 'role' attribute provides accessibility features

Postby wgabrie » Fri Apr 20, 2007 4:35 pm

I found a good reason for the introduction of predefined roles in W3's specification. It provides accessibility features. See: Accessible Web 2.0 Applications with WAI-ARIA

Its assistive technology like "Aural stylesheets" but this one is for HTML. Someone should take note of this. :idea:
wgabrie
<h4>
 
Posts: 25
Joined: Thu Apr 05, 2007 8:55 pm

Postby adrienne » Wed Apr 25, 2007 3:35 pm

Right. And it doesn't overload "class" with possibly-changeable semantics. So for BOTH reasons, I think i'd like to specifically propose that this idea get re-examined!

To specifically restate: I propose that WHAT-WG move the "predefined classes" idea into its OWN attribute. "role" is one possible name for the new attribute; I'm sure others can be thought of.

Adrienne L. Travis
adrienne
<h6>
 
Posts: 3
Joined: Wed Apr 11, 2007 4:43 pm

Postby Cerbera » Sat Apr 28, 2007 12:48 pm

As I understand it, the ARIA introduction of the XHTML role attribute is only for XML documents at the moment. This attribute could perhaps be added to text/html documents via the work on HTML5, which would be neat. I think this was discussed in brief in the past?

At the moment, IBM's proposal for text/html compatibility does, in fact, overload the class attribute.
Cerbera
<h4>
 
Posts: 34
Joined: Wed Feb 21, 2007 1:04 pm


Return to Feedback on the Specs

Who is online

Users browsing this forum: No registered users and 1 guest