Closed Bug 664142 Opened 14 years ago Closed 13 years ago

DEFAULT state exposed incorrectly for HTML

Categories

(Core :: Disability Access APIs, defect)

8 Branch
x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: aaronlev, Assigned: surkov)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached file Partial testcase (deleted) —
The IA2/ATK state DEFAULT must indicate which button will be triggered if the user hits Enter in a form (in any control which doesn't already consume Enter). However, our logic is currently too simple. Some problems: 1. <input type="image"> will act as a submit button (triggered on Enter), but we don't expose DEFAULT for it. 2. Only the first submit button in a form is triggered by Enter, but we expose DEFAULT for all of them. I've created a test case but haven't checked out what happens when HTML 4 buttons are added (<button type="button"> or <button type="submit">). Most likely we need some common code for nsHTMLButtonAccessible and nsHTML4ButtonAccessible which will 1) allow input type="image" to be considered a default button and 2) only allow the first submit button to be marked as default. http://mxr.mozilla.org/mozilla-central/source/accessible/src/html/nsHTMLFormControlAccessible.cpp#263
Mounir is there an intrinsic state for this?
(In reply to comment #1) > Mounir is there an intrinsic state for this? Sure, it's NS_EVENT_STATE_DEFAULT (which is used by the pseudo-class :default). See: https://mxr.mozilla.org/mozilla-central/source/content/html/content/src/nsGenericHTMLElement.cpp#2765
Blocks: statea11y
Target Milestone: --- → mozilla7
Version: unspecified → 8 Branch
Target Milestone: mozilla7 → ---
Attached patch patch (deleted) — Splinter Review
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #564138 - Flags: review?(bolterbugz)
Comment on attachment 564138 [details] [diff] [review] patch stealing review per irc
Attachment #564138 - Flags: review?(bolterbugz) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: