JDK-4891716 : stddoclet: Add "accesskey" attribute to Prev/Next links for keyboard shortcuts
  • Type: Sub-task
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Resolved
  • Resolution: Won't Fix
  • OS: other
  • CPU: generic
  • Submitted: 2003-07-16
  • Updated: 2024-04-12
  • Resolved: 2018-01-25
Description
Add "accesskey" attribute to <A> tags to satisfy checkpoint 9.5 of the 
Techniques for Web Content Accessibility Guidelines 1.0.
This is not required for 508 compliance, but is recommended by W3C
at priority 3.

The spec says:

    * 9.5 Provide keyboard shortcuts to important links (including those 
      in client-side image maps), form controls, and groups of form controls. 
      [Priority 3]

  Keyboard access to active elements of a page is important for many users who 
  cannot use a pointing device. User agents may include features that allow 
  users to bind keyboard strokes to certain actions. HTML 4.01 allows content 
  developers to specify keyboard shortcuts in documents via the "accesskey" 
  attribute.

  Example.

  In this example, if the user activates the "C" key, the link will be followed.

   <A accesskey="C" href="doc.html" hreflang="en"
      title="XYZ company home page">
         XYZ company home page</A>

  End example.

  Note: Until user agents provide an overview of which key bindings are 
  available, provide information on the key bindings.

  Source: http://www.w3.org/TR/WCAG10-HTML-TECHS/#link-accesskey

For javadoc, the "accesskey" attribute for AppletStub would look like this:

   <A accesskey="P" href="AppletContext.html" hreflang="en"
      title="AppletContext interface in java.applet">
      PREV CLASS</A>

   <A accesskey="N" href="AudioClip.html" hreflang="en"
      title="AudioClip interface in java.applet">
      NEXT CLASS</A>

Apparently the access key needs no "shift" key and is not case-sensitive.

"The invocation of access keys depends on the underlying system. For instance, 
on machines running MS Windows, one generally has to press the "alt" key in 
addition to the access key. On Apple systems, one generally has to press the 
"cmd" key in addition to the access key."
Source: http://www.w3.org/TR/html401/interact/forms.html#adef-accesskey

Comments
The support for "Prev" and "Next" pages will be removed as a part of JDK-8196027 hence this will not be fixed.
25-01-2018

Need to revisit this and figure out shortcut keys usage as a whole.
02-12-2015