This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 144749 - A11Y: Component with no mnemonic in "Create Java DB Database" dialog
Summary: A11Y: Component with no mnemonic in "Create Java DB Database" dialog
Status: RESOLVED WONTFIX
Alias: None
Product: qa
Classification: Unclassified
Component: a11y (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: John Baker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-21 18:20 UTC by Roman Mostyka
Modified: 2011-02-16 17:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Mostyka 2008-08-21 18:20:06 UTC
Components with no mnemonic :
  Class: javax.swing.JLabel {  Database Location: |  }
  Class: javax.swing.JLabel {  Database Name: |  }
  Class: javax.swing.JLabel {  Database Password: |  }
  Class: javax.swing.JLabel {  User Name: |  }
Comment 1 John Baker 2008-08-21 18:35:36 UTC
I don't think a mnemonic is needed for labels since the mnemonic wouldn't be usable
Comment 2 Roman Mostyka 2008-08-22 10:41:34 UTC
Probably you are right. The problem is that I saw many times dialogs with JLabel components and haven't seen this a11y
issue for them.
Comment 3 John Baker 2008-08-22 16:20:36 UTC
won't fix
Comment 4 Andrei Badea 2008-08-22 17:47:13 UTC
This is a valid issue. The labels need to have mnemonics *and* their "labelFor" property needs to point to the
respective text field. That way, when the user invokes the mnemonic, the text field is focused.
Comment 5 John Baker 2008-08-22 19:13:56 UTC
agree that labels should have LABEL_FOR for the corresponding components but if the mnemonic on the label isn't
available to the end user then it doesn't make sense to me to include the mnemonic
Comment 6 Andrei Badea 2008-08-22 20:47:31 UTC
Not sure I understand what you mean by "the mnemonic on the label isn't available to the end user". If you give the
label a mnemonic, it will be available to the user, no? Could you please elaborate?
Comment 7 John Baker 2008-08-25 16:16:53 UTC
If a label's LABEL_FOR is not set (to a component) then there's no component that can accept focus.

For this issue, though, the labels should have LABEL_FOR set (to the textfields) so I agree that the labels should have
a mnemonic.
Comment 8 John Baker 2008-08-25 23:55:53 UTC
It appears the A11y report is incorrect.

The labels do have mnemonics:

 databaseNameLabel.setLabelFor(databaseNameTextField);
        org.openide.awt.Mnemonics.setLocalizedText(databaseNameLabel,
org.openide.util.NbBundle.getMessage(CreateDatabasePanel.class, "LBL_DatabaseName")); // NOI18N

        databaseLocationLabel.setLabelFor(databaseLocationTextField);
        org.openide.awt.Mnemonics.setLocalizedText(databaseLocationLabel,
org.openide.util.NbBundle.getMessage(CreateDatabasePanel.class, "LBL_DatabaseLocation")); // NOI18N

        userLabel.setLabelFor(userTextField);
        org.openide.awt.Mnemonics.setLocalizedText(userLabel,
org.openide.util.NbBundle.getMessage(CreateDatabasePanel.class, "LBL_UserName")); // NOI18N

        passwordLabel.setLabelFor(passwordTextField);
        org.openide.awt.Mnemonics.setLocalizedText(passwordLabel,
org.openide.util.NbBundle.getMessage(CreateDatabasePanel.class, "LBL_Password")); // NOI18N


Comment 9 Roman Mostyka 2008-08-26 12:59:51 UTC
I don't see this issues on Windows anymore, but see it on Mac OS X. If accessibility on Mac OS X is different, then this
issue can be closed as FIXED. If not, then platform and os should be changed and issue must be fixed.
Comment 10 John Baker 2008-08-29 01:22:24 UTC
This is either a bug in Apple JDK or Mnemonics class.

Here is the result on Windows:

===============================================
 Tested Window title : Create Java DB Database
===============================================
Results of Accessibility test
 Doesn't implement Accessible :
   - none.
 No Accessible name :
   - none.
 No Accessible description :
   - none.
 Label with LABEL_FOR not set :
   - none.
 Components with no LABEL_FOR pointing to it :
   - none.
 Components with no mnemonic :
   - none.
 Components with wrong mnemonic (mnemonic isn't ASCII , label doesn't contain mnemonic):
   - none.
 Components not reachable with tab traversal :
   - none.
Comment 11 Jaromir Uhrik 2010-11-01 10:13:41 UTC
Now this issue is related to a11y-tester tool. This tool is not working properly on Mac OS - identifying mnemonics troubles is not correct on this platform.
Comment 12 Marian Mirilovic 2011-02-16 17:20:24 UTC
too old without plan to fix it