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.
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: | }
I don't think a mnemonic is needed for labels since the mnemonic wouldn't be usable
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.
won't fix
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.
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
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?
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.
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
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.
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.
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.
too old without plan to fix it