Skip to content

Commit 92a38ce

Browse files
committed
updated inverted arrow key comment
1 parent dbc78d5 commit 92a38ce

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/lib/slider/slider.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,12 @@ export class MdSlider implements ControlValueAccessor {
360360
this.value = this.min;
361361
break;
362362
case LEFT_ARROW:
363-
// It's kind of debatable what's the correct thing to do for inverted sliders. For a sighted
364-
// user it would make more sense that when they press an arrow key the thumb moves in that
365-
// direction. However for a blind user, nothing about the slider indicates that it is
366-
// inverted. They will expect left to be decrement, regardless of how it appears on the
367-
// screen. For speakers of RTL languages, they probably expect left to mean increment.
368-
// Therefore we flip the meaning of the side arrow keys for RTL but not for inverted.
363+
// NOTE: For a sighted user it would make more sense that when they press an arrow key on an inverted slider the
364+
// thumb moves in that direction. However for a blind user, nothing about the slider indicates that it is
365+
// inverted. They will expect left to be decrement, regardless of how it appears on the screen. For speakers of
366+
// RTL languages, they probably expect left to mean increment. Therefore we flip the meaning of the side arrow
367+
// keys for RTL. For inverted sliders we prefer a good a11y experience to having it "look right" for sighted
368+
// users, therefore we do not swap the meaning.
369369
this._increment(this.direction == 'rtl' ? 1 : -1);
370370
break;
371371
case UP_ARROW:

0 commit comments

Comments
 (0)