Last Comment Bug 664142 - DEFAULT state exposed incorrectly for HTML
: DEFAULT state exposed incorrectly for HTML
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: 8 Branch
: x86 All
-- normal (vote)
: mozilla10
Assigned To: alexander :surkov
: alexander :surkov
Depends on:
Blocks: statea11y
  Show dependency treegraph
Reported: 2011-06-14 07:52 PDT by Aaron Leventhal
Modified: 2011-10-03 18:49 PDT (History)
5 users (show)
surkov.alexander: in‑testsuite+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Partial testcase (1.24 KB, text/html)
2011-06-14 07:52 PDT, Aaron Leventhal
no flags Details
patch (5.73 KB, patch)
2011-10-03 01:06 PDT, alexander :surkov
tbsaunde+mozbugs: review+
Details | Diff | Splinter Review

Description User image Aaron Leventhal 2011-06-14 07:52:31 PDT
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.
Comment 1 User image David Bolter [:davidb] 2011-06-14 08:02:47 PDT
Mounir is there an intrinsic state for this?
Comment 2 User image Mounir Lamouri (:mounir) 2011-06-14 08:06:51 PDT
(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).
Comment 3 User image alexander :surkov 2011-10-03 01:06:50 PDT
Created attachment 564138 [details] [diff] [review]
Comment 4 User image Trevor Saunders (:tbsaunde) 2011-10-03 03:27:31 PDT
Comment on attachment 564138 [details] [diff] [review]

stealing  review per irc
Comment 5 User image alexander :surkov 2011-10-03 07:31:38 PDT
inbound land
Comment 6 User image Matt Brubeck (:mbrubeck) 2011-10-03 16:54:19 PDT

Note You need to log in before you can comment on or make changes to this bug.