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

Access Bridge lacks html tags parsing

    XMLWordPrintable

Details

    Backports

      Description

        Name: dk106046 Date: 11/05/2003

        Platform (Solaris / Win32) : Win32
        Operating System Level/Version : Wndows NT FP6
        Specific Sun Release Information : SUN 1.4.2/ AccessBridge 1.0.4

        Symptoms:
        Many of the swing Java widgets take HTML marked up text. However, I found that Ferrett nor JAWS parse through the HTML tags. These tools proceed to report/read the text with the HTML tags. It would be a bit redundant to maintain a non-HTML tag and HTML tag entry just to be accessible.
        This is a Java Access Bridge defect. Ferrett and Jaws are consumers of the access bridge output. The problem here is that the access bridge does not parse the html tags allowed in java widgets. Thus, the consumers of the access bridge output, such as Ferret and Jaws, report back the accessibility text with html tags.

        Impact on product plans: Hindrance to accessibility verification.

        Recreation Steps:
        1. Install and setup Java Access Bridge to work with your JVM.
        2. Start Ferret.
        3. When Ferret comes up from the menu bar select "JavaEvents"
           and then select "Track Mouse Events".
        4. Start the test case application using the same JVM as above.
            java JLabelDemo
        5. Hover the mouse over the text "JLabel accepts html tags. However, the java access bridge does not parse the tags!"
        6. Notice on the JavaFerret window that the Accessible information's Name also reflects the html tags:
           "<html>JLabel accepts html tags. However, the java access bridge <b>does not</b> parse the tags!</html>"

        ======================================================================

        Testcase :

        import javax.swing.*;
        import java.awt.*;
        import java.awt.event.*;

        public class JLabelDemo
        {
          final JFrame f = new JFrame("JLabelDemo");
          ImageIcon imgIcon;

          public JLabelDemo()
          {
            //ImageIcon with all its accessible information set.
            imgIcon = new ImageIcon("middle.gif","Image description set on
        constructor. ");
            imgIcon.getAccessibleContext().setAccessibleName("Icon accessible name.
        ");
            imgIcon.getAccessibleContext().setAccessibleDescription("Icon
        accessible description. ");

            //JLabel that will contain the accessible enabled ImageIcon
            JLabel imgLabel = new JLabel(imgIcon);

            //JLabel that shows the accessible properties set in the ImageIcon
        object.
            JLabel label4imgLabel = new JLabel(imgIcon.getDescription()
                                               +", "+
                                               imgIcon.getAccessibleContext
        ().getAccessibleName()
                                               +", "+
                                               imgIcon.getAccessibleContext
        ().getAccessibleDescription());

            //JLabel accepts html tags for formatting, however notice that
            JLabel htmlProbLabel = new JLabel("<html>JLabel accepts html tags.
        However, the java access bridge <b>does not</b> parse the tags!</html>");

            JPanel contentPane = new JPanel(new BorderLayout());
            contentPane.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
            contentPane.add(imgLabel, BorderLayout.NORTH);
            contentPane.add(label4imgLabel, BorderLayout.CENTER);
            contentPane.add(htmlProbLabel,BorderLayout.SOUTH);

            f.setContentPane(contentPane);
            f.addWindowListener(new WindowAdapter() {
                                  public void windowClosing(WindowEvent e) {
        System.exit(0);}
                                });
            f.pack();
            f.setVisible(true);
          }

          public static void main(String[] argv)
          {
            JLabelDemo jopd = new JLabelDemo();
          }
        }
        ###@###.### 2003-11-05

        Attachments

          Issue Links

            Activity

              People

                arapte Ambarish Rapte
                dkorbel David Korbel (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: