Closed
Bug 960248
Opened 12 years ago
Closed 12 years ago
[AccessFu] Label-embedded range widgets don't get keyboard events from label.
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: eeejay, Assigned: eeejay)
Details
Attachments
(1 file, 1 obsolete file)
|
1.57 KB,
patch
|
Details | Diff | Splinter Review |
Since bug #915458, we land on a label with a nested control, instead of the control itself. The assumption is that activating the label will activate the control, which is true. But range widgets, take up/down arrow keys which are not redirected to the labelled control from the label. So we need to do that manually. Also, for non native ranges this would all go without saying.
| Assignee | ||
Comment 1•12 years ago
|
||
Attachment #8360626 -
Flags: review?(yura.zenevich)
Comment 2•12 years ago
|
||
Comment on attachment 8360626 [details] [diff] [review]
Fix range adjustments when on a label.
Review of attachment 8360626 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with the inline change. Sorry for the long wait :).
::: accessible/src/jsat/content-script.js
@@ +342,5 @@
> }
>
> function adjustRange(aMessage) {
> function sendUpDownKey(aAccessible) {
> + let acc = Utils.getEmbeddedControl(aAccessible);
I believe you need:
let acc = Utils.getEmbeddedControl(aAccessible) || aAccessible;
In case there's no label and there are no LABEL_FOR relations. Without it, I think, the swipe up/down will not work on plan input ranges.
@@ +346,5 @@
> + let acc = Utils.getEmbeddedControl(aAccessible);
> + if (acc.DOMNode) {
> + let evt = content.document.createEvent('KeyboardEvent');
> + let keycode = aMessage.json.direction == 'forward' ?
> + content.KeyEvent.DOM_VK_DOWN : content.KeyEvent.DOM_VK_UP;
Nit: indentation.
Attachment #8360626 -
Flags: review?(yzenevich) → review+
| Assignee | ||
Comment 3•12 years ago
|
||
(In reply to Yura Zenevich [:yzen] from comment #2)
> Comment on attachment 8360626 [details] [diff] [review]
> Fix range adjustments when on a label.
>
> Review of attachment 8360626 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> r=me with the inline change. Sorry for the long wait :).
>
> ::: accessible/src/jsat/content-script.js
> @@ +342,5 @@
> > }
> >
> > function adjustRange(aMessage) {
> > function sendUpDownKey(aAccessible) {
> > + let acc = Utils.getEmbeddedControl(aAccessible);
>
> I believe you need:
> let acc = Utils.getEmbeddedControl(aAccessible) || aAccessible;
> In case there's no label and there are no LABEL_FOR relations. Without it, I
> think, the swipe up/down will not work on plan input ranges.
>
Good catch.
| Assignee | ||
Comment 4•12 years ago
|
||
Attachment #8360626 -
Attachment is obsolete: true
| Assignee | ||
Comment 5•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in
before you can comment on or make changes to this bug.
Description
•