Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 34141

Summary: Help dialogs and forms should have access keys
Product: [Eclipse Project] Platform Reporter: Dorian Birsan <birsan>
Component: User AssistanceAssignee: Konrad Kolosowski <konradk>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 Keywords: accessibility
Version: 2.1   
Target Milestone: 3.0 M9   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Dorian Birsan CLA 2003-03-07 15:35:51 EST
HTML objects can have an accesskey attribute that acts like key 
bindings/mnemonics in a regular UI. Help should make use of such keys, in 
particular in its working set dialogs or tabs/toolbars.
Comment 1 Dorian Birsan CLA 2003-03-07 15:40:41 EST
From w3c:

accesskey = character [CN] 
This attribute assigns an access key to an element. An access key is a single 
character from the document character set. Note. Authors should consider the 
input method of the expected reader when specifying an accesskey. 
Pressing an access key assigned to an element gives focus to the element. The 
action that occurs when an element receives focus depends on the element. For 
example, when a user activates a link defined by the A element, the user agent 
generally follows the link. When a user activates a radio button, the user 
agent changes the value of the radio button. When the user activates a text 
field, it allows input, etc.

The following elements support the accesskey attribute: A, AREA, BUTTON, INPUT, 
LABEL, and LEGEND, and TEXTAREA.

This example assigns the access key "U" to a label associated with an INPUT 
control. Typing the access key gives focus to the label which in turn gives it 
to the associated control. The user may then enter text into the INPUT area.

<FORM action="..." method="post">
<P>
<LABEL for="fuser" accesskey="U">
User Name
</LABEL>
<INPUT type="text" name="user" id="fuser">
</P>
</FORM>

Comment 2 Konrad Kolosowski CLA 2003-07-02 12:36:55 EDT
The accesskey works only when ALT is pressed together with the key.  For 
mnemonics the keys should work without ALT to be consistent with the workbench.

I will look at solutions that would involve key listener (onkeypress or 
onkeydown).
Comment 3 Konrad Kolosowski CLA 2003-07-09 14:21:09 EDT
Actually it is correct to require ALT key.  Eclipse works with ALT as well.  
It is only dialogs where shortcuts can work without ALT keys.

I have implemented shortcuts and shown mnemonics in the labels for working set 
dialogs in help.  The mnemonics are indicated by adding "&" character in after 
the mnemonic character in the labels in the properties, as is done for labels 
in SWT widgets.  I also enabled Enter and Escape keys to confirm and cancel 
dialogs.
On the main help window, I have added shortcuts to search field and working 
set link.

What I did not do is to provide shortcuts for buttons in help toolbar.  The 
reason is that the buttons are implemented as <a> elements not <button> 
elements.  It causes the shortcut key combination to bring focus to the button 
but not execute the action on Internet Explorer.  The buttons should be 
reimplemented as <button> elements.  It makes sense to do this work when there 
will be redesign of look for Eclipse UI and Help UI, later in 3.0 cycle, 
rather than reimplement, tweak, and test now.  Also some actions on the 
toolbar already have shortcuts (provided by the browser) Back, Forward, and 
Print can be executed by ALT-LEFT_ARROW, ALT-RIGHT_ARROW, and CTLR-P.
Comment 4 Konrad Kolosowski CLA 2004-04-30 20:29:31 EDT
Marking as fixed.  Dialogs got access keys.