Using Standard Text Formatting For Headings

From WCAG WG

STATUS

  • entered by PeterKorn

Applicability

Plain text documents. Not applicable to technologies that contain markup.

Description

The current Technique T3 doesn't show in the examples a variety of other ways in which headings may be done. This proposed update expands (via replacement) the existing Description text and Tests text, and introduces a new Procedure 2 (along with Example 2 and Test for Procedure 2), which follows a heading convention commonly used in UNIX man pages.


Description

The objective of this technique is to use text formatting conventions to convey the structure of the content. Headings are used to locate and label sections of a text document, showing the organization of the document.

There are two common ways of indicating headings, described below and also shown in separate examples.

Procedure 1: using blank lines

The beginning of a heading is indicated by

  • two blank lines preceding the heading

The end of a heading is indicated by

  • a blank line following the heading

A blank line contains any number of non-printing characters, such as space or tab, followed by a new line.

The programmatic identification of the Heading is the two blank lines preceding it and one blank line succeeding it. Text documents are necessarily void of underlying structure and so structure must be indicated in the programmatic layout for screen readers. This programmatic layout will enable screen readers to voice blank lines twice before the text that will be considered as a heading. A screen magnifier user would decipher headings by visually identifying the space before it (or their technology may have Screen reader capabilities that can identify the spaces).


Procedure 2: ALL CAPS and indentation

The beginning of a heading is indicated by

  • a blank line preceding the heading
  • the heading appearing in ALL CAPS
  • the content underneath the heading being uniformly indented

The end of a heading is indicated by

  • a blank line
  • the end of the indentation (typically because of the start of another heading)

A blank line contains any number of non-printing characters, such as space or tab, followed by a new line.


Examples

Example 2:

						
FIRST HEADING
     Some content for this first heading.

SECOND HEADING
     Some content for this second heading.  This content may span 
     multiple lines.  This content may also be broken up into
     multiple paragraphs.

     Content within a heading that spans multiple paragraphs will 
     follow  "T1: Using standard text formatting conventions for
     paragraphs" while at the same time also adhering to the 
     indentation requirement for content within a heading.

THIRD HEADING
     Just as with paragraphs (above), content within a heading
     may contain lists.  Such lists will likewise follow
     "T2: Using standard text formatting conventions for lists"
     while at the same time also adhering to the indentation
     requirement for content within a heading.

     - First item of an unordered list within a heading

     - Second item of an unordered list within a heading, 
       which may wrap around to multiple lines or paragraphs.


Tests

For Procedure 1

For each heading in the content:

  1. Check that each heading is preceded by two blank lines
  2. Check that each heading is followed by a blank line
  3. Check that no heading contains any blank lines

For Procedure 2

For each heading in the content:

  1. Check that each heading is preceded by one blank line
  2. Check that each heading is in ALL CAPS
  3. Check the content within the heading is uniformly indented (except for content that may be also following rules for lists, which also apply the list rules)

Expected Results

  • All of the checks above are true.

If this is a sufficient technique for a success criterion, failing this test procedure does not necessarily mean that the success criterion has not been satisfied in some other way, only that this technique has not been successfully implemented and can not be used to claim conformance.