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

RFE : Javadoc Accessibility : Generate WAI-ARIA compliant HTML

XMLWordPrintable

      SYNOPSIS
      --------
      Accessibility in Javadoc: generate WAI-ARIA compliant HTML


      OPERATING SYSTEMS
      -----------------
      ALL


      PATCH BASE
      ---------
      See attached webrev for code changes and jtreg testcase, based on JDK 8 (b51).


      FULL JDK VERSIONS
      -----------------
      All


      DESCRIPTION from LICENSEE
      -------------------------
      Javadoc generated HTML does not comply with the W3C WAI-ARIA specification. This is a widely adopted specification which aims to ensure that accessibility tools such as screen readers can work accurately and consistently.

      WAI-ARIA standards specify that web pages be divided into regions based on the type of content. The attached image illustrates the demarcation of regions of a typical javadoc page. Each region is marked with a role such as:

      1. main
      2. navigation
      3. banner
      4. content-info

      WAI-ARIA standards also recommend that a region be labelled as aria-label, arial-labelledby or fallback to title.

      The labelling needs to be such that

      1. Multiple WAI-ARIA navigation landmarks must have unique labels
         specified with aria-label or aria-labelledby so as not to confuse
         users while navigating a page.

      2. Elements that use WAI-ARIA properties must reference valid IDs to
         enable compatibility with assistive technologies.

      For reference:

      http://www.w3.org/TR/wai-aria-practices/
      http://www.w3.org/TR/wai-aria/
      http://www-03.ibm.com/able/guidelines/web/webprogrammaticui.html

      https://blogs.oracle.com/korn/entry/making_rich_web_applications_accessible
      http://www.html5accessibility.com/tests/roles-land.html
      http://www.paciellogroup.com/blog/2010/10/using-wai-aria-landmark-roles/

      EXAMPLE
      -------
      Current HTML:
      <!-- ========= START OF TOP NAVBAR ======= -->
      <div class="topNav"><a name="navbar_top">

      Accessible equivalent:
      <!-- ========= START OF TOP NAVBAR ======= -->
      <div role="navigation" title ="TOP_Navigation" aria-label ="Top Navigation Bar"/>
      <div class="topNav"><a name="navbar_top">


      REPRODUCTION INSTRUCTIONS
      -------------------------
      1. For any packages, generate javadoc using the javadoc command

         javadoc -d e:\docs -sourcepath . java.util javax.swing java.io

      2. Open the HTML in a browser and mouse over some of the components

      Observed behavior:
      Labels will not be seen

      Expected behavior:
      Labels/tooltips should be seen

            bpatel Bhavesh Patel (Inactive)
            dkorbel David Korbel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: