Warning:
This wiki has been archived and is now read-only.

ProposedElements/forAttribute

From XHTML2
Jump to: navigation, search

Introduction of @for into the Text Attributes Collection

Background

The for attribute, is defined in HTML 4.01 to bind LABEL (or multiple LABELs) to a form control using an IDREF. While the adoption of XForms as the XHTML2 XForms Module relegates the original use of the for attribute obsolete, the for attribute should be re-introduced into the XHTML2 Text Module to provide textual expansions and explicit bindings between labelling text and the text it labels.

Proposed

  1. That the for/id mechanism, which is already broadly supported in user agents and assistive technologies, be repurposed and extended in XHTML2 to provide explicit bindings between labelling text and the object or objects that text labels;
  2. That the for/id mechanism serve as a means of re-using values for:
    1. ABBR
    2. D (the single letter "dialogue" element)
    3. DFN;
  3. That the for/id mechanism serve as a means of binding a quotation, contained in the Q element, and a corresponding CITE declaration which identifies the source of the quote;
  4. That the for/id mechanism serve as a means of marking text which has been inserted, contained in an INS, and that which it is intended to replace, contained in a DEL tag, as illustrated below;

Example/Sample Code

ABBR and @for

  <ABBR id="a1" title="Modularization">M12n</ABBR>
  ...
  <ABBR for="a1">M12n</ABBR>

DFN and @for

  <DFN id="a2" title="Accessibility"><ABBR>A11y</ABBR></DFN>
  ...
  <ABBR for="a2">A11y</ABBR>

INS and DEL Bound by @for

   <INS id="insert13">This is the new text</INS>
   <DEL for="insert11">This is the text to be deleted.</DEL>

Binding a Quote to a CITE using @for

<section role="main">
<q for="fdr3i"
href="http://www.hicom.net/~oedipus/exegesis/fdr-third-inaugural.html#fdr3ip36s1"
>In the face of great perils never before encountered, our 
strong purpose is to protect and to perpetuate the integrity of 
democracy.</q>
<!-- ... -->
</section>
<!-- ... -->
<section role="secondary">
<!-- ... -->
<h id="biblio">Bibliography</h>
<!-- ... -->
<ol>
<li role="contentinfo"><cite id="fdr3i" 
src="http://www.fdrpapers.gov/fdr3i.html"
>Roosevelt, Franklin Delano. Third Inaugural Address. Delivered 
before a joint session of congress, January 20, 1941. (official 
White House transcript)</cite></li>
</ol>
<!-- ... -->
</section>