Closed Bug 346529 Opened 19 years ago Closed 19 years ago

Pressing accesskey for checkbox should toggle it

Categories

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

1.8 Branch
defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: timwi, Assigned: MatsPalmgren_bugz)

Details

(Keywords: fixed1.8.1, regression, testcase)

Attachments

(4 files, 2 obsolete files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5 See STR. Reproducible: Always Steps to Reproduce: 1. View attachment. 2. Press Alt+A. Actual Results: Checkbox is focussed, but nothing else happens. Expected Results: Checkbox should be toggled. That is standard behaviour in all other major UI environments.
Attached file Test case
Changing "Component" from "Form Manager" -> "Keyboard Navigation" as it probably fits better in there.
Component: Form Manager → Keyboard Navigation
Keywords: testcase
I always thought you used the spacebar to toggle checkboxes.
Accesskey should act like a click unless accessibility.accesskeycausesactivation is false. Is this a regression?
Status: UNCONFIRMED → NEW
Ever confirmed: true
I see this reported problem with Bon Echo nightly build 20060731, Aaron is right this is a regression.
Keywords: regression
The content access key modifier was changed to Shift+Alt intentionally in bug 340902. If I press Shift+Alt+A in a recent Bon Echo build, I get the same behavior that I get if I use Alt+A in 1.5.0.5 (checkbox gets the focus ring, but isn't checked). If this bug is about Alt+A not focusing the checkbox, then it's invalid. If it's about Shift+Alt+A not checking the checkbox, then it could be valid, I guess, but it isn't a regression from 1.5.0.x.
It's a valid bug. Shift+Alt+A is focusing the checkbox but not toggling it. The change to shift may have caused the regression.
Component: Keyboard Navigation → Keyboard: Navigation
Product: Firefox → Core
Version: unspecified → 1.0 Branch
Actually, I'm not sure that it's a regression though -- the accesskey is not toggling the checkbox in Firefox 1.5 as I would expect. Another odd thing that I noticed while playing with this: if you shift+click on the checkbox a few times it actually disappears.
(In reply to comment #8) > Actually, I'm not sure that it's a regression though -- the accesskey is not > toggling the checkbox in Firefox 1.5 as I would expect. That's what I said in comment 6... :) > Another odd thing that I noticed while playing with this: if you shift+click > on the checkbox a few times it actually disappears. Shift+Double click is an AdBlock feature to quickly remove unwanted elements from the page. Do you happen to have adblock installed?
Good call on the Adblock, yes :)
Assignee: nobody → mats.palmgren
Severity: normal → minor
OS: Windows 2000 → All
Hardware: PC → All
Version: 1.0 Branch → 1.8 Branch
Attached file Testcase #2
Results, SeaMonkey trunk on Linux: Shift-Alt-A: INPUT(tester): focus LABEL: click INPUT(tester): click INPUT(tester): change left mouse-click on label: LABEL: click INPUT(tester): focus INPUT(tester): click INPUT(tester): change left mouse-click on checkbox: INPUT(tester): focus INPUT(tester): click INPUT(tester): change
This bug is not a recent regression: works: 2005-01-20-06 broken: 2005-01-24-05 (broken by bug 146066) broken: 2006-03-07-04 works: 2006-03-07-14 (most likely fixed by bug 234455)
Attached patch Like so? (obsolete) — Splinter Review
With this patch I get the same results as trunk for Testcase #2.
Attachment #231637 - Flags: review?(bzbarsky)
Er... Labels should be responsing to the system event group here (the default action of the label is to dispatch a click to the control). Why is that not working? Is the label never getting a click in the system event group or something?
Attached patch Patch rev. 2Splinter Review
(In reply to comment #14) > Is the label never getting a click in the system event group or > something? Yes. This patch adds the missing call. Additionally, I think the order of events is wrong (also on trunk). With this patch we get what I think is the correct order: LABEL: click INPUT(tester): focus INPUT(tester): click INPUT(tester): change This is the same order of events that we get for a mouse left-click on the label. If I leave "ChangeFocusWith()" unconditional but include the rest of the patch, we get the same order of events as we currently have on trunk: INPUT(tester): focus LABEL: click INPUT(tester): click INPUT(tester): change By skipping it we instead rely on this code to set the focus instead: http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/content/html/content/src/nsHTMLLabelElement.cpp&rev=1.87.6.1&root=/cvsroot&mark=240-241#211
Attachment #231637 - Attachment is obsolete: true
Attachment #231845 - Flags: review?(bzbarsky)
Attachment #231637 - Flags: review?(bzbarsky)
Comment on attachment 231845 [details] [diff] [review] Patch rev. 2 Yeah, here we go. This looks excellent! Make the focus change on trunk too, right?
Attachment #231845 - Flags: superreview+
Attachment #231845 - Flags: review?(bzbarsky)
Attachment #231845 - Flags: review+
Attached patch ChangeFocusWith() hunk for trunk (obsolete) — Splinter Review
Attachment #231847 - Flags: superreview?(bzbarsky)
Attachment #231847 - Flags: review?(bzbarsky)
Referring the right method in the comment too...
Attachment #231847 - Attachment is obsolete: true
Attachment #231849 - Flags: superreview?(bzbarsky)
Attachment #231849 - Flags: review?(bzbarsky)
Attachment #231847 - Flags: superreview?(bzbarsky)
Attachment #231847 - Flags: review?(bzbarsky)
Attachment #231845 - Flags: approval1.8.1?
Attachment #231849 - Flags: superreview?(bzbarsky)
Attachment #231849 - Flags: superreview+
Attachment #231849 - Flags: review?(bzbarsky)
Attachment #231849 - Flags: review+
QA Contact: form.manager → keyboard.navigation
Comment on attachment 231845 [details] [diff] [review] Patch rev. 2 a=schrep for drivers.
Attachment #231845 - Flags: approval1.8.1? → approval1.8.1+
Comment on attachment 231845 [details] [diff] [review] Patch rev. 2 Checked in to MOZILLA_1_8_BRANCH at 2006-08-05 15:19 PDT
Comment on attachment 231849 [details] [diff] [review] Trunk patch, rev. 2 Checked in to trunk at 2006-08-05 15:18 PDT.
-> FIXED
Status: NEW → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Component: Keyboard: Navigation → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: