Created attachment 539208 [details] Partial testcase 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
Created attachment 564138 [details] [diff] [review] patch
Comment on attachment 564138 [details] [diff] [review] patch stealing review per irc