Closed Bug 17602 Opened 25 years ago Closed 20 years ago

Arrow keys should change radio buttons, not Tab

Categories

(Core :: Layout: Form Controls, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: cpratt, Assigned: aaronlev)

References

()

Details

(Keywords: access, testcase, Whiteboard: [TESTCASE] Tab should switch to next non-radio form item, arrow keys should switch to next radio item)

Attachments

(3 files, 3 obsolete files)

Build ID: 1999102908 Platform: Windows 98 To reproduce: - Load the URL above - Click into the first text input control - Press Tab to advance to the radio buttons ("How many hours...?") - Press the right arrow key Result: Nothing happens - Press the Tab key Result: You advance to the next radio button This is not correct. You should be able to move between the radio buttons using the cursor keys, pressing Space to select an option. As it is now, you have to use the Tab key, which is not correct.
Assignee: karnaze → pollmann
Eric, I'm not sure if this is yours.
QA Contact update.
Target Milestone: M17
Marking M17.
Summary: Cursor keys should change radio buttons, not Tab → Arrow keys should change radio buttons, not Tab
Changing summary from "Cursor" to "Arrow"
Making test case (lobotomy42@netscape.net), also marking 4xp
Keywords: 4xp, makingtest
Attached file Testcase for bug 17602 (deleted) —
Keywords: makingtesttestcase
Whiteboard: [TESTCASE] Tab should switch to next non-radio form item, arrow keys should switch to next radio item
Note that the requested behaviour is that of IE. NS 4.x does things the way Moz does them. If, in this case, Moz is following NS rather than IE conventions, this bug is INVALID. Gerv
Rescheduling
Status: NEW → ASSIGNED
Target Milestone: M17 → M21
Pollman, the updated Netscape UI for this is speced at http://gooey/client/5.0/specs/keyboard/kybdnav2.htm Note that the Focus behavior has also changed to enhanse the recognition of Radio button groups. Any one outside Netscape please contact me if you need this.
This bug has been marked "future" because the original netscape engineer working on this is over-burdened. If you feel this is an error, that you or another known resource will be working on this bug,or if it blocks your work in some way -- please attach your concern to the bug for reconsideration.
Target Milestone: M21 → Future
Updating QA contact.
QA Contact: ckritzer → bsharma
QA Contact Update
QA Contact: bsharma → vladimire
taking.
Assignee: pollmann → blakeross
Status: ASSIGNED → NEW
*** Bug 76910 has been marked as a duplicate of this bug. ***
This is also a problem in prefs with Modern3, but not with Classic.
usability/polish, 0.9.4.
Status: NEW → ASSIGNED
Target Milestone: Future → mozilla0.9.4
Target Milestone: mozilla0.9.4 → mozilla0.9.5
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Target Milestone: mozilla0.9.6 → mozilla1.0
adding access keyword, cc'ing aaronl for input. Is this critical for moz1.0? If so, should move to earlier milestone, else move to later one.
Keywords: access
From an accessibility standpoint, we need to fix this at some point, but after we fix things that just plain aren't accessible at all.
Target Milestone: mozilla1.0 → mozilla0.9.9
Target Milestone: mozilla0.9.9 → mozilla1.2
-> default owner
Assignee: blaker → rods
Status: ASSIGNED → NEW
QA Contact: vladimire → madhur
Priority: P3 → P2
Target Milestone: mozilla1.2 → Future
QA Contact: madhur → tpreston
*** Bug 26697 has been marked as a duplicate of this bug. ***
-> John Keiser
Assignee: rods → jkeiser
This is a consistency issue that affects web-based applications. The XUL dialogs already handle this as requested in this bug, so Mozilla is inconsistent in behavior between HTML forms and XUL dialogs.
John, do you even want bugs assigned to you any more?
Assignee: john → aaronleventhal
This bug still exists. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040423 Firefox/0.8.0+
Blocks: atfmeta
Severity: minor → normal
Target Milestone: Future → mozilla1.9alpha
Next we'll have to file a bug on focus outlines not surrounding the current radio or checkbox <label>
Attachment #151379 - Flags: review?(bryner)
Attached patch Another test case (obsolete) (deleted) — Splinter Review
This testcase works better with our patch than with IE, which gets confused about what radio group is current. On the other hand, IE does a better job with the focus outline (puts it around the labels specified in this test case).
Attachment #151379 - Flags: review?(bryner) → review+
Attachment #151379 - Flags: superreview?(neil.parkwaycc.co.uk)
Comment on attachment 151379 [details] [diff] [review] 1) Only selected radios are tabbable unless nothing selected in current group, 2) Arrow keys change selection and current focus Your navigation code fails in the case where the focused radio button isn't the current button, this can occur when no button is current, but it can also occur when a button cancels the click. Since access keys focus the the element before clicking could you make up/down do that too? IE supports shifted arrow keys (well it's one fewer modifer to check... should you really be using + instead of ||?). That callback from the input element back to the esm looks ugly :-/
Attachment #151379 - Flags: superreview?(neil.parkwaycc.co.uk) → superreview-
Attached file Second test case (deleted) —
Attachment #151380 - Attachment is obsolete: true
BTW, the tabindex check for nsIDOMHTMLInputElement is going away. There's going to be a general tabindex check at the start of esm for all elements, but that's another patch in bug 171366. It removes all of the dozen plus tabindex checks in GetNextTabbableContent() in favor of just one. Also, we're going to put tabIndex on nsIDOMNSHTMLElement. Anyway, this brings me to "That callback from the input element back to the esm looks ugly :-/" For now I'd like to keep that in esm. Ideally all elements would know if they're tabbable. I'd like nsIDOMNSHTMLElement to have a |readonly attribute boolean isTabbable| -- perhaps also on nsIDOMXULElement. However, we're not there quite yet. For now, esm is still a big hack and it uses the static variable sTabFocusModel directly. In the future I'd like it to ask the element whether it's focusable. When we do that we'll put the static on nsGenericHTMLElement or something and support ::GetIsTabbable there. So for now, to keep these big changes managable I'd like to keep GetTabbable() where it is, if that's okay. We can file another bug to do the code improvements I'm talking about, which will be another reasonable incremental step toward cleaning up esm's tab navigation code. We just can't do it all at once.
Did not move GetTabbable at the moment, for reasons explained in previous comment.
Attachment #151379 - Attachment is obsolete: true
Comment on attachment 152208 [details] [diff] [review] New patch addressing Neil's comments (other than moving GetTabbable) Carrying bryner's r= over.
Attachment #152208 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #152208 - Flags: review+
Attachment #152208 - Flags: superreview?(neil.parkwaycc.co.uk)
Comment on attachment 152221 [details] [diff] [review] Create GetNextRadioButton method instead of trying to force that functionality into GetCurrentRadioButton Carrying bryner's r=
Attachment #152221 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #152221 - Flags: review+
Comment on attachment 152221 [details] [diff] [review] Create GetNextRadioButton method instead of trying to force that functionality into GetCurrentRadioButton > /** >- * Set the current radio button in a group >+ * Get the current radio button in a group > * @param aName the group name >- * @param aRadio the currently selected radio button [OUT] I don't think you meant to delete this line. > */ > NS_IMETHOD GetCurrentRadioButton(const nsAString& aName, > nsIDOMHTMLInputElement** aRadio) = 0; > > /** >+ * Set the next/prev radio button in a group >+ * @param aDirection == -1 to get prev in group, == 1 for next >+ * @param aStartRadio the radio button to start from >+ * @param aRadio the currently selected radio button [OUT] >+ */ >+ NS_IMETHOD GetNextRadioButton(const nsAString& aName, >+ const PRBool aPrevious, >+ nsIDOMHTMLInputElement* aFocusedRadio, >+ nsIDOMHTMLInputElement** aRadio) = 0; Fix the comment to reflect reality :-P
Attachment #152221 - Flags: superreview?(neil.parkwaycc.co.uk) → superreview+
Checking in content/html/content/public/nsIRadioGroupContainer.h; /cvsroot/mozilla/content/html/content/public/nsIRadioGroupContainer.h,v <-- nsIRadioGroupContainer.h new revision: 1.3; previous revision: 1.2 done Checking in content/base/src/nsDocument.h; /cvsroot/mozilla/content/base/src/nsDocument.h,v <-- nsDocument.h new revision: 3.235; previous revision: 3.234 done Checking in content/base/src/nsDocument.cpp; /cvsroot/mozilla/content/base/src/nsDocument.cpp,v <-- nsDocument.cpp new revision: 3.508; previous revision: 3.507 done Checking in content/html/content/src/nsHTMLFormElement.cpp; /cvsroot/mozilla/content/html/content/src/nsHTMLFormElement.cpp,v <-- nsHTMLFormElement.cpp new revision: 1.166; previous revision: 1.165 done Checking in content/html/content/src/nsHTMLInputElement.cpp; /cvsroot/mozilla/content/html/content/src/nsHTMLInputElement.cpp,v <-- nsHTMLInputElement.cpp new revision: 1.356; previous revision: 1.355 done Checking in content/events/src/nsEventStateManager.cpp; /cvsroot/mozilla/content/events/src/nsEventStateManager.cpp,v <-- nsEventStateManager.cpp new revision: 1.507; previous revision: 1.506 done
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Aaron, did you file that bug you mentioned in commen 25?
(In reply to comment #36) > Aaron, did you file that bug you mentioned in comment 25? Just filed bug 249813 - und ja it was on my todo list :]
Next time you go an change a DOM interface, make sure to get my or peterv's approval for the changes before landing them!
This caused bug 253299
Depends on: 315859
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: