Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8162363

Tables in javadoc documentation missing row headers

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b138
    • Verification:
      Verified

      Description

      The tables in the generated javadoc documentation are missing row headers
      because the row markup is missing scope="row" in the first <td> element of
      each <tr> elements of the table's body-type rows.

      This is an example of the current, incorrect table markup where the row
      headers are missing:

      <table class="memberSummary" border="0" cellpadding="3" cellspacing="0"
      summary="Field Summary table, listing fields, and an explanation">
      <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
      <tr>
      <th class="colFirst" scope="col">Modifier and Type</th>
      <th class="colLast" scope="col">Field and Description</th>
      </tr>
      <tr class="altColor">
      <td class="colFirst"><code>static int</code></td>
      <td class="colLast"><code><span class="memberNameLink"><a
      href="../oracle/tip/b2b/callout/CalloutContext.html#BOOLEAN_VALUE">BOOLEAN_VALUE</a></span></code>&nbsp;</td>
      </tr>
      <tr class="rowColor">
      <td class="colFirst"><code>static int</code></td>
      <td class="colLast"><code><span class="memberNameLink"><a
      href="../oracle/tip/b2b/callout/CalloutContext.html#FLOAT_VALUE">FLOAT_VALUE</a></span></code>&nbsp;</td>
      </tr>
      <tr class="altColor">
      <td class="colFirst"><code>static int</code></td>
      <td class="colLast"><code><span class="memberNameLink"><a
      href="../oracle/tip/b2b/callout/CalloutContext.html#INTEGER_VALUE">INTEGER_VALUE</a></span></code>&nbsp;</td>
      </tr>
      <tr class="rowColor">
      <td class="colFirst"><code>static int</code></td>
      <td class="colLast"><code><span class="memberNameLink"><a
      href="../oracle/tip/b2b/callout/CalloutContext.html#STRING_VALUE">STRING_VALUE</a></span></code>
      <div class="block">Define some constants for the various primitive types of
      data</div>
      </td>
      </tr>
      </table>


      This is how the above tables markup would be made correct by adding
      scope="row".

      <table class="memberSummary" border="0" cellpadding="3" cellspacing="0"
      summary="Field Summary table, listing fields, and an explanation">
      <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
      <tr>
      <th class="colFirst" scope="col">Modifier and Type</th>
      <th class="colLast" scope="col">Field and Description</th>
      </tr>
      <tr class="altColor">
      <td class="colFirst" scope="row"><code>static int</code></td>
      <td class="colLast"><code><span class="memberNameLink"><a
      href="../oracle/tip/b2b/callout/CalloutContext.html#BOOLEAN_VALUE">BOOLEAN_VALUE</a></span></code>&nbsp;</td>
      </tr>
      <tr class="rowColor">
      <td class="colFirst" scope="row"><code>static int</code></td>
      <td class="colLast"><code><span class="memberNameLink"><a
      href="../oracle/tip/b2b/callout/CalloutContext.html#FLOAT_VALUE">FLOAT_VALUE</a></span></code>&nbsp;</td>
      </tr>
      <tr class="altColor">
      <td class="colFirst" scope="row"><code>static int</code></td>
      <td class="colLast"><code><span class="memberNameLink"><a
      href="../oracle/tip/b2b/callout/CalloutContext.html#INTEGER_VALUE">INTEGER_VALUE</a></span></code>&nbsp;</td>
      </tr>
      <tr class="rowColor">
      <td class="colFirst" scope="row"><code>static int</code></td>
      <td class="colLast"><code><span class="memberNameLink"><a
      href="../oracle/tip/b2b/callout/CalloutContext.html#STRING_VALUE">STRING_VALUE</a></span></code>
      <div class="block">Define some constants for the various primitive types of
      data</div>
      </td>
      </tr>
      </table>


      Test of javadoc generated tables was

      1. Load document in Browser window, Firefox only.
      2. Run Oracle Toolbar accessibility checker. Use the Table Helper Tool. If
      Helper Toolbar is not running in your browser,
      go to OGHAG/OAG Helper Toolbar.
      3. Output window of Table Helper Tool shows the following:
         a. Summary of table, if defined.
         b. In each table cell, a green box will show "Headers" and a list of
      headers that will be read by a screen reader before reading the value of the
      cell.
         c. If the first column in the table is the primary column, the list in the
      green box will only read the header of the first column
         d. In all subsequent columns, the list in the green box should show at
      least 2 headers, the row header then the column header.
      4. Attached file shows that there are no row headers defined in the table.

      In the Table Helper, it shows the violation, "Warning: No row header found
      (WCAG2 1.3.1)" for all table.

      This is a violation of WCAG 1.3.1, 508 1194.22(g), 508 1194.22(h)

      This violation is only particular to javadoc and should not be extrapolated
      to other types of documentation.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bpatel Bhavesh Patel (Inactive)
              Reporter:
              shadowbug Shadow Bug
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: