Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4855054
Votes 0
Synopsis javadoc doesn't output <NOSCRIPT> tag with <SCRIPT> tag (accessibility)
Category doclet:tbd
Reported Against 1.4.1
Release Fixed 1.5(tiger-b32)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs
Submit Date 28-APR-2003
Description

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 :

 customer  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  xxxxx  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) 
======================================================================
Work Around
N/A
Evaluation
Accepted


Clarified synopsis from:
  1.4 javadoc doesn't output html with <NOSCRIPT> tag

  javadoc doesn't output <NOSCRIPT> tag with <SCRIPT> tag (accessibility)

  xxxxx@xxxxx   2003-09-23

Fixed.
  xxxxx@xxxxx   2003-12-08
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang