<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://microformats.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=PaselRacle</id>
	<title>Microformats Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://microformats.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=PaselRacle"/>
	<link rel="alternate" type="text/html" href="https://microformats.org/wiki/Special:Contributions/PaselRacle"/>
	<updated>2026-05-26T23:46:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://microformats.org/wiki/index.php?title=abbr-design-pattern&amp;diff=25655</id>
		<title>abbr-design-pattern</title>
		<link rel="alternate" type="text/html" href="https://microformats.org/wiki/index.php?title=abbr-design-pattern&amp;diff=25655"/>
		<updated>2008-02-10T10:04:50Z</updated>

		<summary type="html">&lt;p&gt;PaselRacle: rollitad&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;eleltacre&lt;br /&gt;
&amp;lt;h1&amp;gt; Abbr design pattern &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Purpose ==&lt;br /&gt;
* Use the [[abbr-design-pattern]] to make text that is human readable also formally machine readable&lt;br /&gt;
* Avoiding using the [[abbr-design-pattern]] to re-encode human text or to hide data&lt;br /&gt;
&lt;br /&gt;
== How to use it ==&lt;br /&gt;
* enclose the human-friendly text that you want to make machine readable with &amp;lt;code&amp;gt;&amp;amp;lt;abbr&amp;gt;&amp;lt;/code&amp;gt; &lt;br /&gt;
* as per the [[class-design-pattern]], add the appropriate &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; attribute to the &amp;lt;code&amp;gt;abbr&amp;lt;/code&amp;gt; element&lt;br /&gt;
* add a &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; attribute to the &amp;lt;code&amp;gt;abbr&amp;lt;/code&amp;gt; element with the machine readable data as the value&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
The [[datetime-design-pattern]] formally encodes (the notoriously unparsable) datetimes into an &amp;lt;code&amp;gt;abbr&amp;lt;/code&amp;gt; element.&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The party is at 10 o'clock on the 10th.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The party is at &lt;br /&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;20051010T10:10:10-0100&amp;quot;&amp;gt;10 o'clock on the 10th&amp;lt;/abbr&amp;gt;.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Alternative presentations==&lt;br /&gt;
Note that the following are all equivalent, to a microformat parser:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;dtstart&amp;quot;&amp;gt;20070501&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;dtstart&amp;quot;&amp;gt;2007-05-01&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;20070501&amp;quot;&amp;gt;1 May 2007&amp;lt;/abbr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;2007-05-01&amp;quot;&amp;gt;1 May 2007&amp;lt;/abbr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;20070501&amp;quot;&amp;gt;1st May 2007&amp;lt;/abbr&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;20070501&amp;quot;&amp;gt;May 1st 2007&amp;lt;/abbr&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;20070501&amp;quot;&amp;gt;The first of May, 2007&amp;lt;/abbr&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;20070501&amp;quot;&amp;gt;2007-05-01&amp;lt;/abbr&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;20070501&amp;quot;&amp;gt;Tuesday, 1 May 2007&amp;lt;/abbr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;20070501&amp;quot;&amp;gt;2007, day 121&amp;lt;/abbr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;20070501&amp;quot;&amp;gt;May Day, 2007&amp;lt;/abbr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;20070501&amp;quot; lang=&amp;quot;FR&amp;quot;&amp;gt;1er mai, 2007&amp;lt;/abbr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;20070501&amp;quot; lang=&amp;quot;ES&amp;quot;&amp;gt;1 de mayo, 2007&amp;lt;/abbr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the following may be used in, say, a list, table, or page, headed &amp;quot;2007&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;20070501&amp;quot;&amp;gt;1 May&amp;lt;/abbr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Discussion ==&lt;br /&gt;
''This discussion is culled from [http://microformats.org/discuss/mail/microformats-discuss/2005-October/001277.html here]''. Consider two possible uses for the [[abbr-design-pattern]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
using ABBR to encode machine readable data around human readable data&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;20051010T10:10:10-0100&amp;quot;&amp;gt;10 o'clock on the 10th&amp;lt;/abbr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
using ABBR to encode more formal human data around something less formal &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;abbr class=&amp;quot;author&amp;quot; title=&amp;quot;Danny Ayers&amp;quot;&amp;gt;Danny&amp;lt;/abbr&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use #1 is encouraged if there's a reasonable need for it. Use #2 is discouraged under the [http://c2.com/cgi-bin/wiki?DontRepeatYourself Don't Repeat Yourself principle], as: &amp;quot;#2 is a case of *more* information being invisibly present, namely, the&lt;br /&gt;
last name in this case. If someone is not willing to make some information visible, then we&lt;br /&gt;
shouldn't be encouraging them to store that information invisibly, for all&lt;br /&gt;
the same reasons that invisible metadata is bad/futile in the first place.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
''I'd like to delete this below, as the points are covered above''&lt;br /&gt;
&lt;br /&gt;
* Theoretically, this could be done with almost any HTML element. But is it a good idea? If it's not, is abbr the only one? [[DavidJanes]]&lt;br /&gt;
* abbr-design-pattern should be avoided, if possible. [[User:RobertBachmann|RobertBachmann]]&lt;br /&gt;
** why, or under what circumstances? For example, it is quite useful with datetimes. Should there not be other potentially analogous situations? [[DavidJanes]]&lt;br /&gt;
** Under circumstances where the text in the title would be gobbledegook if read by a screenreader. JAWS and other screenreaders use title attributes from abbr, when used properly (as in this example from the WCAG group), to pronounce words which would otherwise be unreadable or confusing. Using machine data such as datetime as a title is an bending of the dictionary definition of abbreviation (contraction by ommision or initialisation, applied at the word and not semantic level), this may not be a great issue in itself, but if screen readers are unable to turn title content into something comprehensible, this will lead to accessibility failures.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Sugar is commonly sold in 5 &amp;lt;abbr title=&amp;quot;pound&amp;quot;&amp;gt;lb.&amp;lt;abbr&amp;gt; bags.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Welcome to the &amp;lt;abbr title=&amp;quot;World Wide Web&amp;quot;&amp;gt;WWW&amp;lt;/abbr&amp;gt;!&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Accessibility issues==&lt;br /&gt;
&lt;br /&gt;
Ironically, this pattern while machine readable for browsers compatible with microformats is not accessible for screenreaders when referring to a date. Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
we have a party in &lt;br /&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;20070312T1700-06&amp;quot;&amp;gt;&lt;br /&gt;
 March 12, 2007 at 5 PM&lt;br /&gt;
&amp;lt;/abbr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would be read by Jaws as&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
we have a party at Twenty million seventy-thousand three-hundred twelve tee seventeen-hundred dash zero six. &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [http://www.webstandards.org/2007/04/27/haccessibility/  accessibility task force] from webstandards.org recommends:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;dtstart&amp;quot; title=&amp;quot;20070312T1700-06&amp;quot;&amp;gt;&lt;br /&gt;
 March 12, 2007 at 5 PM, Central Standard Time&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;dtstart&amp;quot;&amp;gt;&lt;br /&gt;
 March 12, 2007 at 5 PM, Central Standard Time&lt;br /&gt;
 &amp;lt;span class=&amp;quot;value&amp;quot; title=&amp;quot;20070312T1700-06&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
see more at  [[abbr-design-pattern-issues]] and [http://www.webstandards.org/2007/04/27/haccessibility/]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[abbr-design-pattern-issues]]&lt;br /&gt;
* [[Main_Page#Design_Patterns|All microformat design patterns]]&lt;br /&gt;
* [http://microformats.org/discuss/mail/microformats-discuss/2005-October/001277.html discussion in microformats-discuss]&lt;br /&gt;
* [[datetime-design-pattern]] uses [[abbr-design-pattern]]&lt;br /&gt;
* [http://www.w3.org/TR/REC-html40/struct/text.html#edef-ABBR HTML 4.01 definition]&lt;/div&gt;</summary>
		<author><name>PaselRacle</name></author>
	</entry>
</feed>