Note: There are a few cases of duplicates in user autocompletion which are being worked on.

a11y: range needs to support more keyboard shortcuts

RESOLVED FIXED

Status

Core Graveyard
XForms
RESOLVED FIXED
12 years ago
a year ago

People

(Reporter: aaronr, Assigned: Allan Beaufour)

Tracking

({fixed1.8.0.2, fixed1.8.1})

Trunk
fixed1.8.0.2, fixed1.8.1

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

1.32 KB, application/xhtml+xml
Details
1.36 KB, patch
smaug
: review+
Details | Diff | Splinter Review
(Reporter)

Description

12 years ago
as per http://www.mozilla.org/access/toolkit-checklist

"Keyboard support for moving slider: arrow keys, home, end, PgUp, PgDn".  Right now xf:range supports the left and right arrow keys.  So we need to support home, end, PgUp and PgDn

AaronL: Home and end seem pretty self-explaining.  But what about page up and page down?  I assume that those increment and decrement the slider like the left and right arrow keys, right?  That is what they do in XSmiles at least.
(Reporter)

Comment 1

12 years ago
Created attachment 203199 [details]
testcase
(Assignee)

Comment 2

12 years ago
(In reply to comment #0)
> AaronL: Home and end seem pretty self-explaining.  But what about page up and
> page down?  I assume that those increment and decrement the slider like the
> left and right arrow keys, right?  That is what they do in XSmiles at least.

I do not know the official guidelines (if there are any), but they should decrement/increment more than up and down in my world.
Hardware: PC → All
(Reporter)

Comment 3

12 years ago
Windows (i.e. the volume control and on the mouse speed panel) has PgUp and PgDn jump the thumb by double what left and right arrow keys do.
(Assignee)

Comment 4

12 years ago
Created attachment 203394 [details] [diff] [review]
Patch
Assignee: aaronr → allan
Status: NEW → ASSIGNED
Attachment #203394 - Flags: review?(aaronr)
(Assignee)

Comment 5

12 years ago
(In reply to comment #4)
> Created an attachment (id=203394) [edit]

Hmm, I do not do exactly what attachment id=203199 says, I move two steps on pageup/down, as comment 3 says and also what KDE does.
(Reporter)

Comment 6

12 years ago
Comment on attachment 203394 [details] [diff] [review]
Patch

>? .svn
>? range.patch
>? semantic.cache
>? content/.svn
>? package/.svn
>? resources/.svn
>? resources/content/.svn
>? resources/locale/.svn
>? resources/locale/en-US/.svn
>Index: resources/content/range.xml
>===================================================================
>RCS file: /cvsroot/mozilla/extensions/xforms/resources/content/range.xml,v
>retrieving revision 1.1
>diff -u -p -U8 -r1.1 range.xml
>--- resources/content/range.xml	14 Nov 2005 08:42:36 -0000	1.1
>+++ resources/content/range.xml	17 Nov 2005 16:02:34 -0000
>@@ -341,18 +341,26 @@
>           if (this.rStep) {
>             move = this.rStep;
>           } else {
>             move = (this.rEnd - this.rBegin) / 20;
>           }
> 
>           if (event.keyCode == event.DOM_VK_LEFT) {
>             this.setSlider(this.rVal - move);
>-          } else if (event.keyCode == event.DOM_VK_RIGHT) {        
>+          } else if (event.keyCode == event.DOM_VK_RIGHT) {
>             this.setSlider(this.rVal + move);
>+          } else if (event.keyCode == event.DOM_VK_PAGE_UP) {
>+            this.setSlider(this.rVal - move * 2);
>+          } else if (event.keyCode == event.DOM_VK_PAGE_DOWN) {
>+            this.setSlider(this.rVal + move * 2);
>+          } else if (event.keyCode == event.DOM_VK_HOME) {
>+            this.setSlider(this.rBegin);
>+          } else if (event.keyCode == event.DOM_VK_END) {
>+            this.setSlider(this.rEnd);
>  

You have PgUp and PgDn backwards.  PgDn should decrease the value and PgUp should increase the value, correct?.  With that fixed, r=me
Attachment #203394 - Flags: review?(aaronr) → review+
(Assignee)

Comment 7

12 years ago
(In reply to comment #6)
> (From update of attachment 203394 [details] [diff] [review] [edit])
> You have PgUp and PgDn backwards.  PgDn should decrease the value and PgUp
> should increase the value, correct?.  With that fixed, r=me

I was really thinking about that. My intuitive use of the keys was how the patch is, while my logic was telling me the reverse (as you are). I tried a horisontal slider in KDE, and it behaved like the patch. Could you try a horisontal slider in Windows/MacOSX and see how it behaves?
(Reporter)

Comment 8

12 years ago
(In reply to comment #7)
> (In reply to comment #6)
> > (From update of attachment 203394 [details] [diff] [review] [edit] [edit])
> > You have PgUp and PgDn backwards.  PgDn should decrease the value and PgUp
> > should increase the value, correct?.  With that fixed, r=me
> 
> I was really thinking about that. My intuitive use of the keys was how the
> patch is, while my logic was telling me the reverse (as you are). I tried a
> horisontal slider in KDE, and it behaved like the patch. Could you try a
> horisontal slider in Windows/MacOSX and see how it behaves?
> 

The ones that I tried on Windows had PgUp as an increaser and PgDn as a decreaser.  XSmiles and the Novell Java processor both do it this way, too.  Javier, could you try on Mac, please?

On Mac OS X, testing on native sliders, PgUp goes to the max, PgDn goes to the min.  Home and End don't do anything.

Comment 10

12 years ago
From the "Accessible Toolkit Checklist"
http://www.mozilla.org/access/toolkit-checklist

Sliders
   1. Keyboard support for moving slider: arrow keys, home, end, PgUp, PgDn
   2. MSAA support including ROLE_SLIDER, accessible value, value change events

I recommend consulting the checklist whenever touching the keyboard UI for a widget, it will make life easier.
(Reporter)

Comment 11

12 years ago
(In reply to comment #10)
> From the "Accessible Toolkit Checklist"
> http://www.mozilla.org/access/toolkit-checklist
> 
> Sliders
>    1. Keyboard support for moving slider: arrow keys, home, end, PgUp, PgDn
>    2. MSAA support including ROLE_SLIDER, accessible value, value change events
> 
> I recommend consulting the checklist whenever touching the keyboard UI for a
> widget, it will make life easier.
> 


Right, that checklist gave rise to this bug.  But the checklist doesn't say what home, end, PgUp and PgDn are supposed to do.  It just says to 'support' them, which doesn't really help us.  We can't really afford to do platform specific checking so what we end up doing will be the same on all platforms.  So we are looking for the 'right' answer for all platforms.  What does Mozilla do when it is defining a custom control that is very similar to a native control?  Which platform's behavior wins?

Comment 12

12 years ago
Ok, home and end go to the beginning and end.

Page up and page down are usually defined by the widget itself, in terms of moving by a larger chunk. That's probably not in the semantics for range. I'd say make that move by 5 times the normal amount. The generaly idea is those keys help you move faster, and I wouldn't fuss over it more than that.
(Assignee)

Comment 13

12 years ago
Created attachment 204118 [details] [diff] [review]
Switch pageup/down
Attachment #203394 - Attachment is obsolete: true
Attachment #204118 - Flags: review?(smaug)

Updated

12 years ago
Attachment #204118 - Flags: review?(smaug) → review+
(Assignee)

Comment 14

12 years ago
Checked in on trunk
Whiteboard: xf-to-branch

Comment 15

12 years ago
(In reply to comment #14)
> Checked in on trunk

Why isn't it marked fixed, then?
(Reporter)

Comment 16

12 years ago
(In reply to comment #15)
> (In reply to comment #14)
> > Checked in on trunk
> 
> Why isn't it marked fixed, then?
> 

We don't mark bugs fixed until they are in the branch.  We mark bugs fixed in trunk as xf-to-branch in the status whiteboard.
(Reporter)

Comment 17

12 years ago
checked into MOZILLA_1_8_BRANCH via bug 323691.  Leaving open for now until it gets into 1.8.0
(Assignee)

Updated

12 years ago
Whiteboard: xf-to-branch
(Assignee)

Updated

12 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Keywords: fixed1.8.0.2
Resolution: --- → FIXED
(Reporter)

Comment 18

11 years ago
verfied fixed on MOZILLA_1_8_BRANCH
Keywords: fixed1.8.1
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.