Opened 11 years ago

Closed 11 years ago

#7774 closed task (fixed)

[patch] [cla] Slider: use doh.robot to test keyboard a11y

Reported by: Joseph Scheuhammer Owned by: Becky Gibson
Priority: high Milestone: 1.3
Component: Accessibility Version: 1.2.0
Keywords: doh robot a11y keystrokes Cc: haysmark, davidb
Blocked By: Blocking:

Description

It is time consuming to manually determine whether dijit.form.Slider is keyboard accessible, and that it implements the keystrokes as documented. It would be better if such testing could be automated.

Actually, this should be done for all the widgets, but one has start somewhere.

Attachments (4)

test_keyboard_Slider.html (5.3 KB) - added by Joseph Scheuhammer 11 years ago.
7774.patch (7.6 KB) - added by Joseph Scheuhammer 11 years ago.
7774a.patch (7.4 KB) - added by Joseph Scheuhammer 11 years ago.
7774b.patch (2.7 KB) - added by Joseph Scheuhammer 11 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 11 years ago by Joseph Scheuhammer

The attached unit test file, "test_keyboard_Slider.html", tests putting focus on a slider via Tab and Shift+tab keystrokes, and manipulating the values of a slider using Home, End, PgUp, PgDn, and the arrow keys. It should be located in ".../dijit/tests/form/robot/test_keyboard_Slider.html".

It was tested against r15370 of trunk, and by loading the test file with FF3 and IE7.

Changed 11 years ago by Joseph Scheuhammer

Attachment: test_keyboard_Slider.html added

comment:2 Changed 11 years ago by Joseph Scheuhammer

Version: 1.2beta1.2.0

The patch file, "7774.patch", makes it such that loading ".../dijit/tests/robot.hml" will run a11y and robot unit tests for slider.

The patch contains a file "test_a11y_Slider.html" that replaces the previous attachment "test_keyboard_Slider.html". The differences are:

  • uses robot mouse events to put focus on the slider (previously used element.focus(), but that sometimes fails to put focus on the slider before robot keypresses are queued up).
  • tests tab focussing of slider.
  • tests keystroke manipulation of slider.
  • tests that ARIA role is properly set (i.e. "slider").
  • tests that ARIA valuemin, valuemax, and valuenow are set or updated as the slider is manipulated.

The aria tests do not involve doh.robot, and could be placed in the current ".../dijit/tests/test_Slider.html" file. It depends on whether it's useful to put all a11y tests in one place or not.

Changed 11 years ago by Joseph Scheuhammer

Attachment: 7774.patch added

comment:3 Changed 11 years ago by Joseph Scheuhammer

Cc: haysmark added; haysmark. removed

comment:4 Changed 11 years ago by Joseph Scheuhammer

Summary: Slider: use doh.robot to test keyboard a11y[patch] [cla] Slider: use doh.robot to test keyboard a11y
  • Merged tests from separate "test_a11y_Slider.html" with existing "test_Slider.html"; see attachment "7774a.patch".
  • a11y tests applied to all but the disabled sliders (previously, tested only a single slider).
  • run with FF3/Mac OS X and IE7/WinXP.

Changed 11 years ago by Joseph Scheuhammer

Attachment: 7774a.patch added

comment:5 Changed 11 years ago by Joseph Scheuhammer

Attaching another patch, "7774b.patch", to fix a couple of bugs:

  • the assertEquals(...) test for a sequence of expected vs. actual values in a11yKeystrokeTest() was not, in fact, comparing anything. Fixed to compare real expected and actual values.
  • added keyStrokeSetup() to pull common intializing code out of a11yKeystrokeTest().
  • removed slider3Keystrokes test fixture as the actual values are mysteriously in error.

Changed 11 years ago by Joseph Scheuhammer

Attachment: 7774b.patch added

comment:6 Changed 11 years ago by Becky Gibson

Milestone: tbd1.3
Resolution: fixed
Status: newclosed

fixed in changeset [15564]

Note: See TracTickets for help on using tickets.