data abbr - speced/respec GitHub Wiki

data-abbr

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.

Usage

<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) -->

Notes

  • 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 its title attribute, 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
⚠️ **GitHub.com Fallback** ⚠️