Created attachment 539208 [details]
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.
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).
Created attachment 564138 [details] [diff] [review]
Comment on attachment 564138 [details] [diff] [review]
stealing review per irc
inbound land https://hg.mozilla.org/integration/mozilla-inbound/rev/265d39da5c3d