title-trigger: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(→‎Semantics: refute last)
 
(9 intermediate revisions by 2 users not shown)
Line 9: Line 9:
==Proposal==
==Proposal==


Use a class name; say "ufusetitle" (for "microformat, use title") or something equally unlikely to otherwise occur in the wild, on any element, to trigger the use of the <code>title</code> attribute.  
Use a class name; say "ufusetitle" (for "microformat, use title") or something equally unlikely to otherwise occur in the wild, on any element, to trigger the use of that element's <code>title</code> attribute. e.g.  


e.g. <nowiki><span class="dtstart ufusetitle" title="2007-08-16">16th August this year</span></nowiki>
<pre>
<nowiki>
    <span  
      class="dtstart ufusetitle"  
      title="2007-08-16"
    >
 
    16th August this year
 
    </span>
</nowiki>
</pre>


===Conversion===
===Conversion===
All existing and new microformats should use this pattern; abbr-design-pattern should be deprecated, but parsers should still be required to recognise it on legacy pages (perhaps for a period of, say, three years)
All existing and new microformats should use this pattern; abbr-design-pattern should be deprecated, but parsers should still be required to recognise it on legacy pages (perhaps for a period of, say, three years)


==Class names==
==Class names==
Line 22: Line 32:
*hsource
*hsource
*hvalue
*hvalue
*uftitletrigger
*...
*...


==Advantages==
==Advantages==
*Simple
*Works on any element
*Works on any element
*Usable on CMSs (e.g. MediaWiki) which do not allow use of <code>abbr</code>
*Usable on CMSs (e.g. MediaWiki) which do not allow use of <code>abbr</code>
*Easy to learn
*Ease of authoring
*Easy for parsers to adapt
*Easy for parsers to adapt


==Disadvantages==
==Issues==
* ???
 
===Semantics===
 
HTML is a markup language: its elements and attributes are intended to be descriptive. They are descriptors rather than commands. The proposed usage of the <code>class</code> attribute would be an instruction rather than a description (somewhat like the <code>target</code> attribute, now deprecated). This would be an abuse of the semantics of the <code>class</code> attribute. (Comment by [[User:Adactio]])
*Not if the class name is read as "microformat usable title" [[User:AndyMabbett|Andy Mabbett]]
 
===Parsers===
 
Existing microformats parsers (such as the Operator extension to Firefox) would need to be updated to handle this proposed alternative to the abbr design pattern. However, this is true of any proposed alternatives.
 
===Complexity===
 
No known or perceived issues.
 
===Assistive technology===
 
The proposed solution assumes that screen readers don't treat <code>title</code> as a special case on elements other than <code>abbr</code> or <code>acronym</code> (or perhaps <code>a</code> and <code>img</code>, which may need to be excluded from the solution) even so, the use of the special class name would be optional in such cases; and suitable guidance should be given to editors.
 
Is this actually the case? Please create a page for [[assistive-technology-title-trigger-results|assistive technology title trigger results]] and add the results of testing there.
 
===Usage in the wild===
 
This design pattern is built on the assumption that the eventually- chosen is not widely used, where it used. Please document examples and references here:


==Alternatives==
==Alternatives==

Latest revision as of 19:28, 17 August 2007

Title trigger

An alternative to the abbr-design-pattern, to address that pattern's accessibility issues.

Contributors

Proposal

Use a class name; say "ufusetitle" (for "microformat, use title") or something equally unlikely to otherwise occur in the wild, on any element, to trigger the use of that element's title attribute. e.g.


    <span 
      class="dtstart ufusetitle" 
      title="2007-08-16"
    >

    16th August this year

    </span>

Conversion

All existing and new microformats should use this pattern; abbr-design-pattern should be deprecated, but parsers should still be required to recognise it on legacy pages (perhaps for a period of, say, three years)

Class names

Other potential class names include:

  • hsource
  • hvalue
  • uftitletrigger
  • ...

Advantages

  • Simple
  • Works on any element
  • Usable on CMSs (e.g. MediaWiki) which do not allow use of abbr
  • Easy to learn
  • Ease of authoring
  • Easy for parsers to adapt

Issues

Semantics

HTML is a markup language: its elements and attributes are intended to be descriptive. They are descriptors rather than commands. The proposed usage of the class attribute would be an instruction rather than a description (somewhat like the target attribute, now deprecated). This would be an abuse of the semantics of the class attribute. (Comment by User:Adactio)

  • Not if the class name is read as "microformat usable title" Andy Mabbett

Parsers

Existing microformats parsers (such as the Operator extension to Firefox) would need to be updated to handle this proposed alternative to the abbr design pattern. However, this is true of any proposed alternatives.

Complexity

No known or perceived issues.

Assistive technology

The proposed solution assumes that screen readers don't treat title as a special case on elements other than abbr or acronym (or perhaps a and img, which may need to be excluded from the solution) even so, the use of the special class name would be optional in such cases; and suitable guidance should be given to editors.

Is this actually the case? Please create a page for assistive technology title trigger results and add the results of testing there.

Usage in the wild

This design pattern is built on the assumption that the eventually- chosen is not widely used, where it used. Please document examples and references here:

Alternatives

See Also