Closed
Bug 555728
Opened 15 years ago
Closed 14 years ago
Fire a11y event based on HTML5 constraint validation
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla2.0b8
People
(Reporter: davidb, Assigned: davidb)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 3 obsolete files)
3.91 KB,
patch
|
MarcoZ
:
review+
davidb
:
approval2.0+
|
Details | Diff | Splinter Review |
This is a potential enhancement TODO for when bug 345624 lands.
Assignee | ||
Updated•15 years ago
|
Attachment #435644 -
Attachment is patch: true
Attachment #435644 -
Attachment mime type: application/octet-stream → text/plain
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → bolterbugz
Comment 2•15 years ago
|
||
We need to set STATE_INVALID as Marco pointed in bug 345624 comment #6.
So whenever @pattern attribute is pointed or proper @type of input control is used (like email type) then we need to manage invalid state and fire state attribute change.
Summary: Fire state change for oninvalid (from new HTML5 Constraint Validation) → Map HTML5 Constraint Validation to AT API
Updated•15 years ago
|
Comment 3•14 years ago
|
||
form elements use :valid/:invalid CSS3 pseudo-classes starting from bug 558788, we should set STATE_INVALID according to these pseudo-classes.
Depends on: 558788
Assignee | ||
Comment 4•14 years ago
|
||
I think this is probably all we need for the event, but I need to add tests. Note bug 601205 dealt with exposing the invalid state which we get nicely from Mounir's intrinsic state.
Attachment #435644 -
Attachment is obsolete: true
Assignee | ||
Updated•14 years ago
|
Summary: Map HTML5 Constraint Validation to AT API → Fire a11y event based on HTML5 constraint validation
Assignee | ||
Comment 5•14 years ago
|
||
Comment on attachment 482932 [details] [diff] [review]
WIP
Might as well get an early review for this part.
Attachment #482932 -
Flags: review?(surkov.alexander)
Comment 6•14 years ago
|
||
I wonder whether we need an event for state invalidate unsetting, mochitests are needed, otherwise looks good.
Assignee | ||
Comment 7•14 years ago
|
||
I think for now we should just fire the one side of the event. I'll add tests and repost when I get back to this one.
Assignee | ||
Updated•14 years ago
|
Attachment #482932 -
Flags: review?(surkov.alexander)
Assignee | ||
Comment 8•14 years ago
|
||
Test passes :)
Attachment #482932 -
Attachment is obsolete: true
Attachment #483573 -
Flags: review?(surkov.alexander)
Comment 9•14 years ago
|
||
Comment on attachment 483573 [details] [diff] [review]
patch
>+ if (aStateMask & NS_EVENT_STATE_INVALID) {
>+ nsRefPtr<AccEvent> event =
>+ new AccStateChangeEvent(aContent1, nsIAccessibleStates::STATE_INVALID,
>+ PR_FALSE, PR_TRUE);
nit: make correct indent here
>+ FireDelayedAccessibleEvent(event);
>+ }
>+
> if (0 == (aStateMask & NS_EVENT_STATE_CHECKED)) {
> return;
> }
>
> nsHTMLSelectOptionAccessible::SelectionChangedIfOption(aContent1);
> nsHTMLSelectOptionAccessible::SelectionChangedIfOption(aContent2);
nit: put this under if statement, that should be nicer
>+ function invalidInput(aNodeOrID, bExpand)
b expand? anyway you don't use it
>+ {
>+ this.DOMNode = getNode(aNodeOrID);
>+
>+ this.invoke = function invalid_invoke() {
invalidInput_invoke please
>+ // Note: this should fire an EVENT_STATE_CHANGE
>+ this.DOMNode.value = "I am too long";
>+ };
>+
>+ this.check = function expand_check() {
expand_check?
>+ testStates(aNodeOrID, STATE_INVALID);
>+ };
>+
>+ this.getID = function changeValue_getID() {
>+ return prettyName(aNodeOrID) + " aria-expanded changed";
again copy/paste
>+ // invalid state change
nit: first capital letter please
r=me with these fixed
Attachment #483573 -
Flags: review?(surkov.alexander) → review+
Assignee | ||
Comment 10•14 years ago
|
||
Attachment #483573 -
Attachment is obsolete: true
Attachment #483957 -
Flags: review?(marco.zehe)
Comment 11•14 years ago
|
||
Comment on attachment 483957 [details] [diff] [review]
patch 2
r=me
Attachment #483957 -
Flags: review?(marco.zehe) → review+
Updated•14 years ago
|
Attachment #483957 -
Flags: approval2.0?
Assignee | ||
Updated•14 years ago
|
Attachment #483957 -
Flags: approval2.0? → approval2.0+
Comment 12•14 years ago
|
||
(In reply to comment #9)
>
> >+ FireDelayedAccessibleEvent(event);
> >+ }
> >+
> > if (0 == (aStateMask & NS_EVENT_STATE_CHECKED)) {
> > return;
> > }
> >
> > nsHTMLSelectOptionAccessible::SelectionChangedIfOption(aContent1);
> > nsHTMLSelectOptionAccessible::SelectionChangedIfOption(aContent2);
>
> nit: put this under if statement, that should be nicer
patch2 doesn't address this comment.
Assignee | ||
Comment 13•14 years ago
|
||
I've addressed it locally. The delay in pushing this is due to a timeout in the statechange test which I need to fix.
Assignee | ||
Comment 14•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
You need to log in
before you can comment on or make changes to this bug.
Description
•