JDK-4855054 : javadoc doesn't output <NOSCRIPT> tag with <SCRIPT> tag (accessibility)
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2003-04-28
  • Updated: 2014-05-05
  • Resolved: 2003-12-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
5.0 b32Fixed
Description
Name: gm110360			Date: 04/28/2003

NOTE: This accessibility request is based on a W3C Recommendation, not the 
U.S. Federal Govt 508 Standard.

FULL PRODUCT VERSION :
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)



FULL OPERATING SYSTEM VERSION :

Microsoft Windows XP [Version 5.1.2600]


A DESCRIPTION OF THE PROBLEM :
In almost every html page generated, there is a <SCRIPT>
tag, but no corresponding <NOSCRIPT> tag.  For this reason
java API for Oracle java technology (i.e. Toplink for java)
can not be posted online,  as it fails accessability tests.

i.e. in com.sun.tools.doclets.standard.HtmlStandardWriter,

this method creates a <NOSCRIPT> tag after a <SCRIPT> tag:

    /**
     * Get Html Hyper Link, with target frame.  This
     * link will only appear if page is not in a frame.
     *
     * @param link String name of the file.
     * @param where Position in the file
     * @param target Name of the target frame.
     * @param label Tag for the link.
     * @param bold Whether the label should be bold or not?
     */
    public String getNoFramesTargetHyperLink(String link,
String where,
                                             String target,
String label,
                                             boolean bold) {
        StringBuffer str = new StringBuffer();
        str.append("\n<SCRIPT>");
        str.append("\n  <!--");
        str.append("\n  if(window==top) {");
        str.append("\n    document.writeln('" +
getTargetHyperLink(link, where, target, label, bold)
+ "');");
        str.append("\n  }");
        str.append("\n  //-->");
        str.append("\n</SCRIPT>");
        str.append("\n<NOSCRIPT>");
        str.append("\n" + getTargetHyperLink(link, where,
target, label, bold));
        str.append("\n</NOSCRIPT>\n");
        return str.toString();
    }








The problem though is that in
com.sun.tools.doclet.HtmlWriter, this method creates only a
<SCRIPT> tag...

Please add <NOSCRIPT> tag immediately after.

    /**
     * Return the script code to be embedded in the
&lt;BODY&gt; tag.
     * @return the script code to be embedded in the
&lt;BODY&gt; tag.
     */
    protected String getScriptCode(){
        if(winTitle != null && winTitle.length() > 0){
            println("<SCRIPT>");
            println("function asd()");
            println("{");
            println("parent.document.title=\"" + winTitle
+ "\";");
            println("}");
            println("</SCRIPT>");
            return " onload=\"asd();\"";
        } else {
            return "";
        }
    }


REGRESSION.  Last worked in version 1.3.1

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Generate any javadoc using 1.4.1 tool
2. View the source of most .html generated to see missing
<NOSCRIPT> tags.

EXPECTED VERSUS ACTUAL BEHAVIOR :
I expect in step two to see <NOSCRIPT> tags wherever I see
<SCRIPT> tags.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
The html was not viewed from a page without javascript, but a diagnostic tool
reported that it failed accessability tests.

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER WORKAROUND :
None (use a previous version of javadoc)
(Review ID: 179208) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta FIXED IN: tiger-beta INTEGRATED IN: tiger-b32 tiger-beta
2004-06-14

PUBLIC COMMENTS Fixed. The NOSCRIPT tag has been added. ###@###.### 2003-12-08
2003-12-08

EVALUATION Accepted Name: dk30142 Date: 04/29/2003 Clarified synopsis from: 1.4 javadoc doesn't output html with <NOSCRIPT> tag to: javadoc doesn't output <NOSCRIPT> tag with <SCRIPT> tag (accessibility) ###@###.### 2003-09-23 Fixed. ###@###.### 2003-12-08
2003-09-23