Closed Bug 443609 Opened 12 years ago Closed 11 years ago

Up, Down, pgUp and pgDown keys are counter-intuitive in a horizontal <scale> widget

Categories

(Toolkit :: XUL Widgets, defect)

defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: mark.crutch+bugzilla, Assigned: enndeakin)

References

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9) Gecko/2008052906 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9) Gecko/2008052906 Firefox/3.0

When a <scale> widget has the focus, the Up Arrow, Down Arrow, Page Up and Page Down keys can be used to change the position of the slider. 

With a simple horizontal scale it is possible to use the Left Arrow and Right Arrow to move the slider, and this works as expected. However, using the Down Arrow or Page Down key moves the slider to the right, towards the maximum value. Similarly, using the Up Arrow or Page Up key moves the slider to the left, towards the minimum value.

In short, the UP keys _decrement_ the value, whereas the DOWN keys _increment_ the value. This seems counter-intuitive.


Note that this is not an issue when using <scale orient="vertical" /> - UP moves the slider up and DOWN moves it down.

Reproducible: Always
Please provide Steps to reproduce this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INCOMPLETE
Attached file Testcase
The attached test case shows this issue. The two vertical scales are fine as the up/down buttons correspond to the movement of the <thumb>, as most people would expect. For a horizontal scale, however, up/down does not have a meaningful mapping to the location of the <thumb>, therefore most people will mentally map those keys to the resultant value instead.

In the second horizontal scale this works okay - the reversed direction means that DOWN decrements the value, and UP increments the value. The problem is with the first scale, which uses the default direction for a horizontal scale. In this case the DOWN key (or PageDOWN) _increments_ the value, whereas the UP key (or PageUP) _decrements_ the value. This is the aspect that I consider to be counter-intuitive.

Steps to reproduce:
1) Load the attached testcase
2) Click on the <thumb> of the first <scale> to focus it
3) Press the UP/DOWN/PageUP/PageDOWN keys on the keyboard and note the effect on the thumb position and the value.
Status: RESOLVED → UNCONFIRMED
Resolution: INCOMPLETE → ---
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1

I tried out the attached test case and found as stated that the down key increments the horizontal scale in the default position. 

This is confirmed. 

Author states this is counter intuitive. 

The MAC Human Interface Guidelines (chapter 7) recommends using meaningful labels to indicate to users the range and direction of the slider.

I have seen the Page up and Page down keys performing this same behavior on older computer systems. That does not make it right - just says that is how it was done in the past. Maybe it is time to fix it?

Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
Duplicate of this bug: 473099
Component: XUL → XUL Widgets
Product: Core → Toolkit
QA Contact: xptoolkit.widgets → xul.widgets
Attached patch fixSplinter Review
Keys now work as follows for scales:

- left moves the thumb left for horizontal scales and decrements vertical scales.
- right moves the thumb right for horizontal scales and increments vertical scales.
- up increments horizontal scales and moves the thumb up on vertical scales
- down decrements horizontal scales and moves the thumb down on vertical scales
- page up and page down are similar to up and down
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Comment on attachment 356527 [details] [diff] [review]
fix

Change the keys to be more logical. Applies on top of the patch to bug 472090.
Attachment #356527 - Flags: review?(neil)
(In reply to comment #3)
> I have seen the Page up and Page down keys performing this same behavior on
> older computer systems. That does not make it right - just says that is how it
> was done in the past. Maybe it is time to fix it?
Interestingly VC7.1's resource editor (VC8 express contains no resource editor) creates a scale control that decrements when you press up arrow, although both the sound and keyboard control panel applets increment when you press up arrow.
Comment on attachment 356527 [details] [diff] [review]
fix

Was it necessary to reorder the key codes?
(In reply to comment #8)
> (From update of attachment 356527 [details] [diff] [review])
> Was it necessary to reorder the key codes?

No, I moved them to group the similar ones together.
Attachment #356527 - Flags: review?(neil) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.