Closed
Bug 718690
Opened 13 years ago
Closed 13 years ago
[Mac] Various form element states not communicated to VoiceOver
Categories
(Core :: Disability Access APIs, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: MarcoZ, Unassigned)
References
()
Details
Attachments
(1 file)
(deleted),
patch
|
surkov
:
review+
|
Details | Diff | Splinter Review |
In this sample form: http://www.marco-zehe.de/examples/tutorial_html5_form_validation_and_aria.html, the following states are not spoken by VoiceOver:
1. The "required" and "invalid" states on the "name" and "e-mail" fields.
2. The multiline state on the "message" field.
Safari can do this.
Reporter | ||
Comment 1•13 years ago
|
||
Must be dealt with, but not for the very first round, unless it gets fixed alongside another p1 or p2 bug.
Priority: -- → P2
Comment 2•13 years ago
|
||
Comment 3•13 years ago
|
||
Comment on attachment 616204 [details] [diff] [review]
Implement required and invalid element states. r=
Review of attachment 616204 [details] [diff] [review]:
-----------------------------------------------------------------
::: accessible/src/mac/mozTextAccessible.mm
@@ +118,5 @@
> }
>
> + if ([attribute isEqualToString:@"AXRequired"])
> + return [NSNumber numberWithBool:
> + (mGeckoAccessible->State() & states::REQUIRED) ? YES : NO];
And yes, I need this long form as it seems that the implicit type conversion to BOOL does not do what one expect.
Attachment #616204 -
Flags: review?(surkov.alexander)
Comment 4•13 years ago
|
||
> ::: accessible/src/mac/mozTextAccessible.mm
> @@ +118,5 @@
> > }
> >
> > + if ([attribute isEqualToString:@"AXRequired"])
> > + return [NSNumber numberWithBool:
> > + (mGeckoAccessible->State() & states::REQUIRED) ? YES : NO];
>
> And yes, I need this long form as it seems that the implicit type conversion
> to BOOL does not do what one expect.
I assume the standard !! trick doesn't help?
does mac only support these states on text accessibles? I'd think you could find cases where someone sets aria-required / invalid on stuff other than text accessibles
Comment 5•13 years ago
|
||
(In reply to Trevor Saunders (:tbsaunde) from comment #4)
> > ::: accessible/src/mac/mozTextAccessible.mm
> > @@ +118,5 @@
> > > }
> > >
> > > + if ([attribute isEqualToString:@"AXRequired"])
> > > + return [NSNumber numberWithBool:
> > > + (mGeckoAccessible->State() & states::REQUIRED) ? YES : NO];
> >
> > And yes, I need this long form as it seems that the implicit type conversion
> > to BOOL does not do what one expect.
>
> I assume the standard !! trick doesn't help?
I didn't try (didn't think of it). I will.
> does mac only support these states on text accessibles? I'd think you could
> find cases where someone sets aria-required / invalid on stuff other than
> text accessibles
It is not really documented, so maybe I should actually make a test case and test in Safari to see what it going on.
Reporter | ||
Comment 6•13 years ago
|
||
Comment on attachment 616204 [details] [diff] [review]
Implement required and invalid element states. r=
What about an indication that a textfield is multiline (e. g. a textarea)? Would that be possible to implement here, too? we currently don't indicate it. So does Safari, but if we can make this better...
Comment 7•13 years ago
|
||
(In reply to Marco Zehe (:MarcoZ) from comment #6)
> Comment on attachment 616204 [details] [diff] [review]
> Implement required and invalid element states. r=
>
> What about an indication that a textfield is multiline (e. g. a textarea)?
> Would that be possible to implement here, too? we currently don't indicate
> it. So does Safari, but if we can make this better...
Is that specific to Lion ? I don't get anything different in Snow Leopard.
Anyway there are actually other bugs with multi-line text area including line number for caret being wrong. I'll look at that again, maybe I missed something.
Comment 8•13 years ago
|
||
Comment on attachment 616204 [details] [diff] [review]
Implement required and invalid element states. r=
Review of attachment 616204 [details] [diff] [review]:
-----------------------------------------------------------------
::: accessible/src/mac/mozTextAccessible.mm
@@ +79,5 @@
> NSAccessibilityNumberOfCharactersAttribute, // required
> NSAccessibilityVisibleCharacterRangeAttribute, // required
> NSAccessibilityInsertionPointLineNumberAttribute,
> + @"AXRequired",
> + @"AXInvalid",
technically invalid and required states applied to any element accessible but if OS X wants them on text accessibles only then ok.
@@ +122,5 @@
> + (mGeckoAccessible->State() & states::REQUIRED) ? YES : NO];
> +
> + if ([attribute isEqualToString:@"AXInvalid"])
> + return [NSNumber numberWithBool:
> + (mGeckoAccessible->State() & states::INVALID) ? YES : NO];
btw, if you like then you could wrap 'if' by { } since its single statements takes more than one line
Attachment #616204 -
Flags: review?(surkov.alexander) → review+
Comment 9•13 years ago
|
||
Comment on attachment 616204 [details] [diff] [review]
Implement required and invalid element states. r=
Review of attachment 616204 [details] [diff] [review]:
-----------------------------------------------------------------
::: accessible/src/mac/mozTextAccessible.mm
@@ +122,5 @@
> + (mGeckoAccessible->State() & states::REQUIRED) ? YES : NO];
> +
> + if ([attribute isEqualToString:@"AXInvalid"])
> + return [NSNumber numberWithBool:
> + (mGeckoAccessible->State() & states::INVALID) ? YES : NO];
Actually I used the !! operator as suggested by trevor and it all fits nicely on one line. :-)
Comment 10•13 years ago
|
||
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla15
Comment 11•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•