This is an unpublished editor’s draft that might include content that is not finalized. View the published version

Skip to content

Technique F999:Failure of Success Criterion 1.3.1 due to visible ruby annotations thatare not programmatically determinable

About this Technique

This technique relates to 1.3.1: Info and Relationships (Failure).

This failure applies to HTML.

Description

This document describes a failure that occurs when text is visually presented to convey ruby annotations without using appropriate semantic markup.

In the following example, an author intends to indicate the pronunciation of the Japanese phrase 見掛け倒し by annotating each of the kanji with , か, and だお respectively.

The Japanese phrase 見掛け倒し with ruby annotations of み, か, and だお, each positioned above its respective kanji.

Examples

Example 1: Misuse of <abbr title> to convey ruby annotations

In this example, a well-meaning author has used <abbr> (i.e., abbreviation) elements and custom CSS to visually convey ruby annotations. This is a failure because assistive technologies cannot programmatically determine the structured ruby annotations that are visually presented.

<abbr title="み"></abbr><abbr title="か"></abbr><abbr title="だお"></abbr>
abbr {
  position: relative;
  text-decoration: none;

  &::before {
    content: attr(title);
    position: absolute;
    inset-block-start: -1.1em;
    inset-inline-start: 50%;
    translate: -50%;
    font-size: 0.5em;
    white-space: nowrap;
  }
}

Failure example of misuse of <abbr title> to convey ruby annotations.

Example 2: Misuse of <sup> to convey ruby annotations

In this example, a well-meaning author has used <sup> (i.e., superscript) elements and custom CSS to visually convey ruby annotations. This is a failure because assistive technologies cannot programmatically determine the structured ruby annotations that are visually presented.

<span class="annotated"><sup></sup></span><span class="annotated"><sup></sup></span><span class="annotated"><sup>だお</sup></span>
.annotated {
  position: relative;
  text-decoration: none;

  & > sup {
    position: absolute;
    inset-block-start: -1.1em;
    inset-inline-start: 50%;
    translate: -50%;
    font-size: 0.5em;
    white-space: nowrap;
  }
}

Failure example of misuse of <sup> to convey ruby annotations.

Example 3: Misuse of <span> to convey ruby annotations

In this example, an author has used <span> elements and custom CSS to visually convey ruby annotations. This is a failure because assistive technologies cannot programmatically determine the structured ruby annotations that are visually presented.

<span class="annotated"><span></span></span><span class="annotated"><span></span></span><span class="annotated"><span>だお</span></span>
.annotated {
  position: relative;
  text-decoration: none;

  & > span {
    position: absolute;
    inset-block-start: -1.1em;
    inset-inline-start: 50%;
    translate: -50%;
    font-size: 0.5em;
    white-space: nowrap;
  }
}

Failure example of misuse of <span> to convey ruby annotations.

Tests

Procedure

For styled text that conveys information:

  1. Check if there is any styled text that conveys structural information.
  2. Check that in addition to styling, the proper semantic structure is used with the text to convey the information.

Expected Results

  • If check 1 is true and check 2 is false, this failure condition applies and the content fails this success criterion.
Back to Top