data abbr - speced/respec GitHub Wiki
Applies to: <dfn>
Automatically generates an <abbr> element after the definition, showing the abbreviation in parentheses. ReSpec generates the abbreviation from the term's initial letters if no value is provided.
<dfn data-abbr>user agent</dfn>
<!-- Renders as: user agent (UA) --><dfn data-abbr="PoS">point of sale</dfn>
<!-- Renders as: point of sale (PoS) -->- With no value (or empty string), ReSpec generates the abbreviation from the capitalized initial letters of the term: "user agent" → "UA"
- With an explicit value, that value is used as-is
- The
<abbr>element added uses the full term as itstitleattribute, enabling screen reader and hover tooltip support - The abbreviation is automatically added as an alias (
data-lt) on the<dfn>, so[=UA=]will link to the definition of "user agent" without needing a separate alias declaration