From whatwg at phroggy.com Sat Nov 1 00:04:29 2008 From: whatwg at phroggy.com (Andy Lyttle) Date: Sat, 1 Nov 2008 00:04:29 -0700 Subject: [whatwg] Add 'type' attribute to In-Reply-To: References: <1804894DFB2E401FB4E722D71118DEBC@Sanktum01> <6ea53250810311820v3126b276t9120e1d51dbdb9e0@mail.gmail.com> Message-ID: On Oct 31, 2008, at 7:57 PM, Ian Hickson wrote: >>> That's what the "class" attribute is for. >> >> What's the difference then between and then? I mean, >> does >> the element provide anything that with an appropriate >> class wouldn't? > > A default style when there's no CSS support, support in accessibility > tools, the ability for search engines to understand what's going on, > easier round-tripping between editors, simpler rules in CSS and other > selector-like environments, etc. The usual benefits of semantics. Are we talking about assigning particular meanings to certain class names? Or are we saying "this is for semantic purposes, but do whatever you want with it, because nobody will see it except UAs that are applying CSS rules and users who view the HTML source code"? If the former, it's a terrible idea because developers have been working with the assumption that there are no reserved keywords so there are bound to be conflicts. If the latter... it doesn't really mean anything, does it? By the way, I gave a ridiculous example earlier of why defining class="footnote" to have semantic meaning would be bad; I got really bored and fleshed out that example: http://phroggy.com/musicalfeet/ -- Andy Lyttle whatwg at phroggy.com From pentasis at lavabit.com Sat Nov 1 00:59:09 2008 From: pentasis at lavabit.com (Pentasis) Date: Sat, 1 Nov 2008 09:59:09 +0200 Subject: [whatwg] Add 'type' attribute to In-Reply-To: References: <1804894DFB2E401FB4E722D71118DEBC@Sanktum01> Message-ID: <7FBE8F6412594407AEA330DB9A0D23DF@Sanktum01> > > The spec already describes how to do footnotes: > > http://www.whatwg.org/specs/web-apps/current-work/#footnotes > Yes, but this is a theoretical explanation that does not provide a consistent, practical solution. > >> As the element has different usages defined on it already why not >> include a "type" attribute (or similar) that defines what it is used >> for. One of these types would then be "footnote", others could be >> (relating to what is already in the spec) "term", "highlight" etc. (I am >> sure others would be much better at thinking up names than I am). > > That's what the "class" attribute is for. > Like I said before, I think class (and id) should be reserved for styling and not be content/semantic related at all. It is strange how we all advocate separation of the two but allow these attributes to encompass descriptive values for both. Bert From julian.reschke at gmx.de Sat Nov 1 03:14:52 2008 From: julian.reschke at gmx.de (Julian Reschke) Date: Sat, 01 Nov 2008 11:14:52 +0100 Subject: [whatwg] Proposing URI Templates for WebForms 2.0 In-Reply-To: <310AF3FB-0D2F-4F96-A0E8-188DC88B28A8@mnot.net> References: <00ff01c735b5$dde0abf0$0702a8c0@Guides.local> <02dd01c93bc5$6e75cda0$6702a8c0@Guides.local> <15C6CE72-1963-4A41-93B8-A95F685326CB@mnot.net> <5D73ACAE-DE0F-4670-8AF3-8D834749F5CB@mnot.net> <032101c93bf5$b68bc790$6702a8c0@Guides.local> <342E43A5-7BDD-4796-B2E2-77D0378CF7E8@mnot.net> <033701c93c02$89672810$6702a8c0@Guides.local> <310AF3FB-0D2F-4F96-A0E8-188DC88B28A8@mnot.net> Message-ID: <490C2C1C.3060409@gmx.de> Mark Nottingham wrote: > ... > Try what I did with hinclude ; > write a javascript library to handle a declarative syntax, and have it > gracefully degrade once the browsers handle it natively. If the markup > is declarative, it doesn't matter if it's in HTML5 or not, you still can > cater to unintended uses. > ... Speaking of which: that one (hinclude) is totally useful; and it would also help with one of the cases Google's recent dictionary-based compression proposal is for. I'd totally be in favor to have something like this in HTML5 (and no, others have asked for it as well). BR, Julian From ian at hixie.ch Sat Nov 1 07:34:09 2008 From: ian at hixie.ch (Ian Hickson) Date: Sat, 1 Nov 2008 14:34:09 +0000 (UTC) Subject: [whatwg] Add 'type' attribute to In-Reply-To: <56081EAFEA6A46EFA06E236BBE960D82@Sanktum01> References: <1804894DFB2E401FB4E722D71118DEBC@Sanktum01> <56081EAFEA6A46EFA06E236BBE960D82@Sanktum01> Message-ID: On Sat, 1 Nov 2008, Andy Lyttle wrote: > On Oct 31, 2008, at 7:57 PM, Ian Hickson wrote: > > > > That's what the "class" attribute is for. > > > > > > What's the difference then between and then? I mean, > > > does the element provide anything that with an > > > appropriate class wouldn't? > > > > A default style when there's no CSS support, support in accessibility > > tools, the ability for search engines to understand what's going on, > > easier round-tripping between editors, simpler rules in CSS and other > > selector-like environments, etc. The usual benefits of semantics. > > Are we talking about assigning particular meanings to certain class > names? All class names have meaning. That's what the class attribute is for -- it's a way for authors to extend the language to cover semantics the language doesn't have, using terms they have defined for their page, site, or organisation. > Or are we saying "this is for semantic purposes, but do whatever > you want with it, because nobody will see it except UAs that are > applying CSS rules and users who view the HTML source code"? If by "this" you mean the class attribute, then neither; it's an extension mechanism, authors should use it for the purpose of annotating their semantics so that they can use those annotated semantics from other contexts (such as tools, scripts, style sheets, etc). On Sat, 1 Nov 2008, Pentasis wrote: > > > > The spec already describes how to do footnotes: > > > > http://www.whatwg.org/specs/web-apps/current-work/#footnotes > > Yes, but this is a theoretical explanation that does not provide a > consistent, practical solution. I don't understand why these solutions aren't consistent or practical. > > > As the element has different usages defined on it already why > > > not include a "type" attribute (or similar) that defines what it is > > > used for. One of these types would then be "footnote", others could > > > be (relating to what is already in the spec) "term", "highlight" > > > etc. (I am sure others would be much better at thinking up names > > > than I am). > > > > That's what the "class" attribute is for. > > Like I said before, I think class (and id) should be reserved for > styling and not be content/semantic related at all. I'm afraid that's not what class and id are for, they are entirely intended as a way for authors to annotate their semantics in more detail. > It is strange how we all advocate separation of the two but allow these > attributes to encompass descriptive values for both. You should never use class (or id) for specifically stylistic reasons. You should use class to annotate the semantics, and then separately use the style sheets to hook onto your annotated semantics to get the style you want in more fine grained detail than the elements allow. This is why values like class="big" or class="green" are bad, but values like class="footnote" or class="user-search-terms" are fine. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From ian at hixie.ch Sat Nov 1 09:03:49 2008 From: ian at hixie.ch (Ian Hickson) Date: Sat, 1 Nov 2008 16:03:49 +0000 (UTC) Subject: [whatwg] WF2 terminology: tokens vs. productions In-Reply-To: References: Message-ID: On Wed, 21 Nov 2007, Henri Sivonen wrote: > > Quoting the spec: > > An e-mail address, following the format of the addr-spec token defined in > > RFC 2822 section 3.4.1 [RFC2822], but excluding the CFWS subtoken > > everywhere, and excluding the FWS subtoken everywhere except in the > > quoted-string subtoken. > > The text should probably talk about productions instead of tokens. Fixed. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From pentasis at lavabit.com Sat Nov 1 09:13:46 2008 From: pentasis at lavabit.com (Pentasis) Date: Sat, 1 Nov 2008 18:13:46 +0200 Subject: [whatwg] Add 'type' attribute to In-Reply-To: References: <1804894DFB2E401FB4E722D71118DEBC@Sanktum01> <56081EAFEA6A46EFA06E236BBE960D82@Sanktum01> Message-ID: <779135F4FC5F4DD59EB5F7B415BCE379@Sanktum01> >> Yes, but this is a theoretical explanation that does not provide a >> consistent, practical solution. > > I don't understand why these solutions aren't consistent or practical. First of all, the spec admits it itself: "HTML does not have a dedicated mechanism for marking up footnotes. Here are the recommended alternatives." Alternatives are not real mechanisms. It gives us the option of using the title attribute (which has no mechanism of expansion and we cannot group them). Then it gives us the a element solution, which is how it is already done in most cases but leaves much to be desired (there are plenty of articles about it on the web). And last it tells us we can use the aside element. But in this example there is no *direct* relation to the actual word/phrase we put in the aside. It also gives us -again- no direct mechanism of expansion and no way of grouping footnotes/sidenotes. Now, I am perfectly happy for this spec not to provide a footnote construct, but in that case I would strongly suggest removing these alternatives and simply say it should be resolved using scripting (which has much more flexibility) or not say anything at all about it. >> Like I said before, I think class (and id) should be reserved for >> styling and not be content/semantic related at all. > > I'm afraid that's not what class and id are for, they are entirely > intended as a way for authors to annotate their semantics in more detail. > > You should never use class (or id) for specifically stylistic reasons. You > should use class to annotate the semantics, and then separately use the > style sheets to hook onto your annotated semantics to get the style you > want in more fine grained detail than the elements allow. > > This is why values like class="big" or class="green" are bad, but values > like class="footnote" or class="user-search-terms" are fine. I will agree to the fact that this is the general consensus. And I have been doing it like that for a long time as well. But I will leave it at that, this is an entirely different discussion which has nothing to do with footnotes and I apologize for bringing it up. Bert From jackalmage at gmail.com Sat Nov 1 09:44:58 2008 From: jackalmage at gmail.com (Tab Atkins Jr.) Date: Sat, 1 Nov 2008 11:44:58 -0500 Subject: [whatwg] Add 'type' attribute to In-Reply-To: <779135F4FC5F4DD59EB5F7B415BCE379@Sanktum01> References: <1804894DFB2E401FB4E722D71118DEBC@Sanktum01> <56081EAFEA6A46EFA06E236BBE960D82@Sanktum01> <779135F4FC5F4DD59EB5F7B415BCE379@Sanktum01> Message-ID: On Sat, Nov 1, 2008 at 11:13 AM, Pentasis wrote: > Yes, but this is a theoretical explanation that does not provide a >>> consistent, practical solution. >>> >> >> I don't understand why these solutions aren't consistent or practical. >> > > First of all, the spec admits it itself: > "HTML does not have a dedicated mechanism for marking up footnotes. Here > are the recommended alternatives." > Alternatives are not real mechanisms. > > It gives us the option of using the title attribute (which has no mechanism > of expansion and we cannot group them). > Then it gives us the a element solution, which is how it is already done in > most cases but leaves much to be desired (there are plenty of articles about > it on the web). > And last it tells us we can use the aside element. But in this example > there is no *direct* relation to the actual word/phrase we put in the aside. > It also gives us -again- no direct mechanism of expansion and no way of > grouping footnotes/sidenotes. > > Now, I am perfectly happy for this spec not to provide a footnote > construct, but in that case I would strongly suggest removing these > alternatives and simply say it should be resolved using scripting (which has > much more flexibility) or not say anything at all about it. > Grouping and such is a stylistic concern, though - as long as the document expresses a footnote semantic, that's all it has to do. For the rest, we have a CSS Module that will cover that area, the Generated and Replaced Content module [1]. By an astonishing coincidence, the editor of this module is no less than Ian himself. [1]: http://www.w3.org/TR/css3-content/ ~TJ -------------- next part -------------- An HTML attachment was scrubbed... URL: From pentasis at lavabit.com Sat Nov 1 10:03:20 2008 From: pentasis at lavabit.com (Pentasis) Date: Sat, 1 Nov 2008 19:03:20 +0200 Subject: [whatwg] Add 'type' attribute to In-Reply-To: References: <1804894DFB2E401FB4E722D71118DEBC@Sanktum01> <56081EAFEA6A46EFA06E236BBE960D82@Sanktum01> <779135F4FC5F4DD59EB5F7B415BCE379@Sanktum01> Message-ID: <70981D35189342F08710E89B24CDF43A@Sanktum01> Grouping and such is a stylistic concern, though - as long as the document expresses a footnote semantic, that's all it has to do. For the rest, we have a CSS Module that will cover that area, the Generated and Replaced Content module [1]. By an astonishing coincidence, the editor of this module is no less than Ian himself. [1]: http://www.w3.org/TR/css3-content/ ~TJ In that case why don't they drop the abbr, dfn, cite, mark etc. elements? They can be styled through CSS as well and be semantically determined by using a class-name just as sugested for footnotes. Bert -------------- next part -------------- An HTML attachment was scrubbed... URL: From pentasis at lavabit.com Sat Nov 1 10:11:53 2008 From: pentasis at lavabit.com (Pentasis) Date: Sat, 1 Nov 2008 19:11:53 +0200 Subject: [whatwg] Cascading Attribute Sheets Message-ID: In the "add type to mark element" discussion which I started, a side argument about ids and classes was brought up. I conveyed my opinion that I think classes should only be used as style handles and not to convey extra semantic meaning. The HTML4 spec states: "The class attribute has several roles in HTML: * As a style sheet selector (when an author wishes to assign style information to a set of elements). * For general purpose processing by user agents." The first role is clear, it is used for styles (not semantics) the second is a bit more muddy I think, but the important part there is: "processing BY user agents". User agents have no interest in semantics, so I fail to see here also why classes may be used to define semantic roles. The fact that a class should be named "footnote" for example is only so you will not get in trouble (unlike when you use a name like "red" or "left"). But this only tells me (the author) that this element should be styled like a footnote and for the user agent that it should render it like a footnote. It should not tell me (or anything else) that it IS a footnote. This would lead inevitably to inflexibility. Let me however put forth a -maybe silly- idea I have had for a long time. In seperating content from style it would seem logical to me that the next step would be to place most attributes (except id and a new role-attribute) also in an external file. Assignment of attributes and purpose can then also be done externally from the html-file leaving it only to contain pure content. (this would benefit SEO, machine readability, accessibility and maintainability). The obvious benefits would be that one can maintain things externally like: links, images, accesskeys, list-numbering, hiding, etc. and if we would assign a common attribute to all elements called "edit" we could set that externally too (like "draft, deleted, approved, date, etc.). but the biggest benefit (I think) is that we can set classnames externally. this way we do not have to touch the html-file to change styles, but simply change the properties in the external attribute sheet. The new role attribute would be completely semantic and classes are no longer indide the html so their naming can be more style-related. And changing a style would no longer mean changing the stylesheet, but changing the attributesheet. It would make CSS a little bit more modular (and flexible). Well, let me have it ;-) Bert From herenvardo at gmail.com Sat Nov 1 12:27:52 2008 From: herenvardo at gmail.com (Eduard Pascual) Date: Sat, 1 Nov 2008 19:27:52 +0000 Subject: [whatwg] Add 'type' attribute to In-Reply-To: References: <1804894DFB2E401FB4E722D71118DEBC@Sanktum01> <6ea53250810311820v3126b276t9120e1d51dbdb9e0@mail.gmail.com> Message-ID: <6ea53250811011227j3ebaae89v6ce7e259fa81cc1d@mail.gmail.com> First of all, I'd like to avoid any missunderstandings: I have nothing against the element itself; although I'm afraid my previous e-mails may lead to think otherwise. It could be a really good addition to HTML but, IMHO, it isn't yet, and I'm trying to show why I think so. On Sat, Nov 1, 2008 at 2:57 AM, Ian Hickson wrote: > On Sat, 1 Nov 2008, Eduard Pascual wrote: >> [...] >> What's the difference then between and then? I mean, does >> the element provide anything that with an appropriate >> class wouldn't? > > A default style when there's no CSS support, support in accessibility > tools, the ability for search engines to understand what's going on, > easier round-tripping between editors, simpler rules in CSS and other > selector-like environments, etc. The usual benefits of semantics. Let's take that point by point: -> A default style when there's no CSS support: that's entirely presentational; and although I may accept it as a side-bonus, I don't feel presentational arguments are a good base for including/excluding a new element. -> Support in accessibility tools: that's plain daydreaming: what kind of support can an AT provide without any hint on whether the 'ed text is a search term, or the line of a code snippet that caused a crash, or the total price of the orders in a shopping cart, or whatever other usage authors may come up with? -> The ability for search engines to understand what's going on?? Comming from someone else, I'd think they are simply wrong, but comming from Ian I really hope you were joking: besides a SE would be as clueless on that aspect as an AT; this would extremelly easily abused by "black hat" SEO, to the point of making the element completely meaningless for SEs: just a "mark { display: none; }" rule and a site becomes able to freely spam "highlighted" keywords across the entire page. And, although many SEs are capable of checking CSS sheets, it's almost trivial to achieve the same from JavaScript, and even to obfuscate the script if any SE managed to figure the trick out. -> Simpler rules in CSS and other selector-like environments: I simply can't believe that this came from an editor of the CSS3 Selectors module. How much simples is "mark" than ".match", ".crash_line", ".total", and so on? The only difference is a single dot; plus the fact that classes give much more flexibility that directly styling (or selecting on any other similar environment) could ever allow. And finally, it's worth to mention that, as soon as a page needs to use for two or more different purposes, there is no other way to differentiate them in selectors than classes (and no way at all for ATs or SEs to differentiate then, BTW). -> The usual benefits of semantics. Honestly, that's a really good purpose; it's only that it's not achieved. If you look again at the counter-arguments above, you should be able to notice that they are nothing else than the usual drawbacks of lack of semantics. Because, simply put, the semantics defined for are so vague that, in practical terms, they are the same as no semantics at all. Pentasis's initial proposal would be a simple and efficient solution to this issue: with some sort of type/role/whatever attribute (based on a well-defined list of allowable values), an AT could tell the user why some text is marked, a SE could figure out what's really going on, and a designer could rely on that attribute upon selection instead of defining classes with an entirely presentational purpose. Well, that's my opinion, just wanted to share it. From t.broyer at gmail.com Sat Nov 1 12:34:19 2008 From: t.broyer at gmail.com (Thomas Broyer) Date: Sat, 1 Nov 2008 20:34:19 +0100 Subject: [whatwg] Cascading Attribute Sheets In-Reply-To: References: Message-ID: On Sat, Nov 1, 2008 at 6:11 PM, Pentasis wrote: > In the "add type to mark element" discussion which I started, a side > argument about ids and classes was brought up. > I conveyed my opinion that I think classes should only be used as style > handles and not to convey extra semantic meaning. > The HTML4 spec states: > > "The class attribute has several roles in HTML: > > * As a style sheet selector (when an author wishes to assign style > information to a set of elements). > * For general purpose processing by user agents." > > The first role is clear, it is used for styles (not semantics) Ian answered to this. You'll similarly or identically style elements with similar or identical meaning; in other words, you'll attach style to semantics, so your class names are likely to markup your document with additional semantics. > the second is > a bit more muddy I think, but the important part there is: "processing BY > user agents". User agents have no interest in semantics, so I fail to see > here also why classes may be used to define semantic roles. Microformats. > The fact that a class should be named "footnote" for example is only so you > will not get in trouble (unlike when you use a name like "red" or "left"). > But this only tells me (the author) that this element should be styled like > a footnote and for the user agent that it should render it like a footnote. > It should not tell me (or anything else) that it IS a footnote. This would > lead inevitably to inflexibility. Why not enclose your footnotes in