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

Missing lang attrib. to identify natural language in javadoc-generated documents

    XMLWordPrintable

    Details

      Description

      This accessibility request is based on a W3C recommendation,
      not the U.S. Federal Government Section 508 Standard.

      For accessibility, identify the natural language (e.g., English)
      of content in HTML pages generated by Javadoc. Propose adding a
      new option:

         -lang <language-code>

         where <language-code> is defined by [RFC1766]
         http://www.ietf.org/rfc/rfc1766.txt

      This option adds the "lang" attribute to the <HTML> tag for each generated page
      that has natural language content.
       
      For example, this option:
       
         -lang "en-US"
       
      generates pages with this tag:
       
         <HTML lang="en-US">

      If the document has content with other language-codes, the user can
      manually include the lang attribute for that language in a <SPAN>, <TD>,
      <P> or almost any other tag.

      This recommendation is W3C checkpoint 4.3 of HTML Techniques for Web Content
      Accessibility Guidelines 1.0, copied here:

          4.3 Identify the primary natural language of a document. [Priority 3]

          It is also good practice to identify the primary language of a document,
          either with markup (as shown below) or through HTTP headers.

          Source: http://www.w3.org/TR/WCAG10-HTML-TECHS/#identify-primary-lang

      ----
          Language codes consist of a primary code and a possibly empty series of
          subcodes:

              language-code = primary-code ( "-" subcode )*

          Here are some sample language codes:

          * "en": English
          * "en-US": the U.S. version of English.
          * "en-cockney": the Cockney version of English.
          * "i-navajo": the Navajo language spoken by some Native Americans.
          * "x-klingon": The primary tag "x" indicates an experimental language tag

          Two-letter primary codes are reserved for [ISO639] language abbreviations.
          Two-letter codes include fr (French), de (German), it (Italian), nl (Dutch),
          el (Greek), es (Spanish), pt (Portuguese), ar (Arabic), he (Hebrew),
          ru (Russian), zh (Chinese), ja (Japanese), hi (Hindi), ur (Urdu), and
          sa (Sanskrit).

          Any two-letter subcode is understood to be a [ISO3166] country code.

          Source: http://www.w3.org/TR/html401/struct/dirlang.html#adef-lang

        Attachments

          Activity

            People

            Assignee:
            bpatel Bhavesh Patel (Inactive)
            Reporter:
            dkramersunw Douglas Kramer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: