Open Bug 554104 Opened 14 years ago Updated 2 years ago

Accesskey doesn't work when same accesskey rendered on label and input

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
Windows XP
defect

Tracking

()

People

(Reporter: cale.scholl, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.18) Gecko/2010020220 Firefox/3.0.18 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.18) Gecko/2010020220 Firefox/3.0.18 (.NET CLR 3.5.30729)

Tested via the following HTML page:
<html>
<body>
<form>
  <label for="q" accesskey="q">q or w</label>
  <input type="radio" id="q" accesskey="w"/>
  <br />
  <label for="e" accesskey="e">e or e</label>
  <input type="radio" id="e" accesskey="e"/>
</form>
</body>
</html>

alt+shift+q and alt+shift+w work fine, but alt+shift+e doesn't work as expected.

Reproducible: Always

Steps to Reproduce:
1. Create an HTML file using the included HTML.
2. Put the focus on the browser address bar then press alt+shift+accesskey. Works for 'q' and 'w' but not 'e'. Oddly enough, if the focus is already on the first input element, then 'e' works (i.e. pressing alt+shift+q followed by alt+shift+e).
Actual Results:  
Works for 'q' and 'w' but not 'e'. Oddly enough, if the focus is already on the first input element, then 'e' works (i.e. pressing alt+shift+q followed by alt+shift+e).

Expected Results:  
If the accesskey is rendered on the label and the input, it should work the same as if it were only rendered on the label or the input.
Attached file HTML test case
Component: General → Disability Access APIs
Product: Firefox → Core
QA Contact: general → accessibility-apis
Component: Disability Access APIs → Keyboard: Navigation
QA Contact: accessibility-apis → keyboard.navigation
A question on the usefulness/correct coding of this example: Why would I want two different access keys for the same input element? Why waste two letters? IMO, it does make no sense whatsoever to have both q and w point to the input with id of "q".
Still exists in FF36. Fiddle at http://jsfiddle.net/gjsjohnmurray/ngt7Lr90/ illustrates the problem in FF and can be used to contrast with what IE and Chrome do.
Component: Keyboard: Navigation → User events and focus handling

changing status to confirmed, also see bug 1532651 comment #38.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: