https://microformats.org/wiki/index.php?title=abbr-design-pattern-ru&feed=atom&action=historyabbr-design-pattern-ru - Revision history2024-03-29T09:25:55ZRevision history for this page on the wikiMediaWiki 1.38.4https://microformats.org/wiki/index.php?title=abbr-design-pattern-ru&diff=34291&oldid=prevDinamytE at 20:56, 17 July 20082008-07-17T20:56:29Z<p></p>
<p><b>New page</b></p><div>{{working-ru|original=abbr-design-pattern}}<br />
<br />
= Шаблон проектирования abbr =<br />
<br />
__NOTOC__<br />
<br />
== Назначение ==<br />
* Используйте данный шаблон, если вам нужно сделать текст ''актуальным'' для человека и ''формально'' читабельным для машины;<br />
* Старайтесь не использовать данный шаблон для перекодировки актуальных данных для человека или для сокрытия данных.<br />
<br />
== Как использовать ==<br />
# Заключите актуальный текст в элемент ''abbr'';<br />
# Как и в [[class-design-pattern-ru|шаблоне проектирования class]], добавьте соответствующие значения атрибута ''class'';<br />
# Добавьте атрибут ''title'' к элементу ''abbr'' с данными, предназначенными для машинной обработки.<br />
<br />
== Примеры ==<br />
Данный шаблон формально кодирует указания даты и времени в элементе ''abbr''.<br />
<br />
До применения:<br />
<br />
<pre><br />
Вечеринка начнётся в 10 часов, десятого числа.<br />
</pre><br />
<br />
После применения:<br />
<br />
<pre><br />
Вечеринка начнётся в<br />
<abbr class="dtstart" title="20051010T10:10:10-0100">10 часов, десятого числа</abbr>.<br />
</pre><br />
<br />
== Альтернативное представление ==<br />
Представленные ниже примеры являются идентичными (для парсера микроформатов):<br />
<br />
<pre><br />
<span class="dtstart">20070501</span><br />
<br />
<span class="dtstart">2007-05-01</span><br />
<br />
<abbr class="dtstart" title="20070501">1 мая, 2007</abbr><br />
<br />
<abbr class="dtstart" title="2007-05-01">2007 года, первого мая</abbr><br />
<br />
<abbr class="dtstart" title="20070501">1 мая 2007</abbr>.<br />
<br />
<abbr class="dtstart" title="20070501">Май, 1 2007</abbr>.<br />
<br />
<abbr class="dtstart" title="20070501">Первое число мая, 2007 года</abbr>.<br />
<br />
<abbr class="dtstart" title="20070501">2007-05-01</abbr>.<br />
<br />
<abbr class="dtstart" title="20070501">Вторник, 1 мая 2007</abbr><br />
<br />
<abbr class="dtstart" title="20070501">2007 год, день 121</abbr><br />
<br />
<abbr class="dtstart" title="20070501">Начало мая, 2007</abbr><br />
<br />
<abbr class="dtstart" title="20070501" lang="FR">1er mai, 2007</abbr><br />
<br />
<abbr class="dtstart" title="20070501" lang="ES">1 de mayo, 2007</abbr><br />
</pre><br />
<br />
Следующий пример может быть использован в списке, таблице или на странице с заголовком «2007»:<br />
<br />
<pre><br />
<abbr class="dtstart" title="20070501">1 мая</abbr><br />
</pre><br />
<br />
== Обсуждение ==<br />
''Данное обсуждение пересено [http://microformats.org/discuss/mail/microformats-discuss/2005-October/001277.html отсюда]'':<br />
<br />
<ol><br />
<li><br />
Использование abbr для кодирования машинных данных вместе с данными, удобочитаемыми для человека. <br />
<br />
<pre><br />
<abbr class="dtstart" title="20051010T10:10:10-0100">10 часов десятого числа</abbr><br />
</pre><br />
</li><br />
<li><br />
Использование abbr для добавления более приближенных к человеку значений, неформальных значений.<br />
<br />
<pre><br />
<abbr class="author" title="Денни Айерс">Денни</abbr> <br />
</pre><br />
</li><br />
</ol><br />
<!--<br />
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: "#2 is a case of *more* information being invisibly present, namely, the<br />
last name in this case. If someone is not willing to make some information visible, then we<br />
shouldn't be encouraging them to store that information invisibly, for all<br />
the same reasons that invisible metadata is bad/futile in the first place."<br />
<br />
''I'd like to delete this below, as the points are covered above''<br />
<br />
* 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]]<br />
* abbr-design-pattern should be avoided, if possible. [[User:RobertBachmann|RobertBachmann]]<br />
** why, or under what circumstances? For example, it is quite useful with datetimes. Should there not be other potentially analogous situations? [[DavidJanes]]<br />
** 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.<br />
<br />
<pre><br />
<p>Sugar is commonly sold in 5 <abbr title="pound">lb.<abbr> bags.</p><br />
<p>Welcome to the <abbr title="World Wide Web">WWW</abbr>!</p><br />
</pre><br />
<br />
==Accessibility issues==<br />
<br />
Ironically, this pattern while machine readable for browsers compatible with microformats is not accessible for screenreaders when referring to a date. Therefore:<br />
<br />
<pre><br />
we have a party in <br />
<abbr class="dtstart" title="20070312T1700-06"><br />
March 12, 2007 at 5 PM<br />
</abbr><br />
</pre><br />
<br />
would be read by Jaws as<br />
<br />
<pre><br />
we have a party at Twenty million seventy-thousand three-hundred twelve tee seventeen-hundred dash zero six. <br />
</pre><br />
<br />
The [http://www.webstandards.org/2007/04/27/haccessibility/ accessibility task force] from webstandards.org recommends:<br />
<br />
<pre><br />
<span class="dtstart" title="20070312T1700-06"><br />
March 12, 2007 at 5 PM, Central Standard Time<br />
</span><br />
</pre><br />
<br />
or <br />
<br />
<pre><br />
<span class="dtstart"><br />
March 12, 2007 at 5 PM, Central Standard Time<br />
<span class="value" title="20070312T1700-06"></span><br />
</span><br />
</pre><br />
<br />
see more at [[abbr-design-pattern-issues]] and [http://www.webstandards.org/2007/04/27/haccessibility/]<br />
<br />
== See Also ==<br />
* [[abbr-design-pattern-issues]]<br />
* [[Main_Page#Design_Patterns|All microformat design patterns]]<br />
* [http://microformats.org/discuss/mail/microformats-discuss/2005-October/001277.html discussion in microformats-discuss]<br />
* [[datetime-design-pattern]] uses [[abbr-design-pattern]]<br />
* [http://www.w3.org/TR/REC-html40/struct/text.html#edef-ABBR HTML 4.01 definition]<br />
--></div>DinamytE