Opened 11 years ago

Closed 11 years ago

#7864 closed task (fixed)

Spinner: 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 aria Cc: haysmark, davidb
Blocked By: Blocking:

Description

Manually testing that dijit.form._Spinner is keyboard accessible, and that it implements the keystrokes as documented, is time consuming. Such testing should be automated.

Also, it would be useful to test whether spinner's required aria properties are properly set as the spinner is manipulated. These include the role (spinbutton) and aria-valuemin, aria-valuemax, and aria-valuenow properties.

Attachments (3)

7864.patch (9.7 KB) - added by Joseph Scheuhammer 11 years ago.
7864a.patch (9.1 KB) - added by Joseph Scheuhammer 11 years ago.
7864b.patch (10.6 KB) - added by Joseph Scheuhammer 11 years ago.
Fix such that tab-focus tests and keystroke tests work in IE. Tested FF3/OSX and IE7/WinXP

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 years ago by Joseph Scheuhammer

The attached patch file, "7864.patch", provides unit tests for the aria role, valuemin, valuemax, and valuenow properties; and robot tests for the keystrokes documented for spinner (TAB focussing, arrow keys, PgUp, PgDn, Home, and End).

One test fails, namely, where the spinner's value is set to null (spinner.attr('value', null)). In that case, spinner.attr('value') returns NaN, but dijit.getWaiState(spinner, aria-valuenow) returns the empty string. That is, the value and the aria-valuenow do not match. This may be an issue with the ARIA spec in that it does not state what valuenow should be if the spinner has no value. My feeling is that the "value" and the "valuenow" should always match -- they should both be NaN, in this case.

Changed 11 years ago by Joseph Scheuhammer

Attachment: 7864.patch added

comment:2 Changed 11 years ago by Joseph Scheuhammer

  • Merged tests from separate "test_a11y_Spinner.html" with existing "test_Spinner.html"; see attachment "7864a.patch".
  • tests for ARIA role (spinbutton) and properties (valuemin, valuemax, and valuenow).
  • robot tests for Tab focus/navigation for most of the spinners.
  • robot tests of a11y keystrokes for all of the spinners (arrow keys, pgup, pgdn, home, and end).

Notes:

  • tab navigation tests do not work in IE7. The focus listener attached with dojo.connect(spinner.focusNode, ...) does not fire in IE7. The focus listener is used to detect when focus moves to a spinner after a Tab or Shift+Tab keypress.
  • keystroke tests do not work in IE7. The keypress listener attached via dojo.connect() does not fire in IE7. The keypress listener is used to acquire the new value after an a11y keypress.
  • the nullAriaValueNow() test fails (see ticket #7866, and comment above).

Changed 11 years ago by Joseph Scheuhammer

Attachment: 7864a.patch added

Changed 11 years ago by Joseph Scheuhammer

Attachment: 7864b.patch added

Fix such that tab-focus tests and keystroke tests work in IE. Tested FF3/OSX and IE7/WinXP

comment:3 Changed 11 years ago by Becky Gibson

Milestone: tbd1.3
Resolution: fixed
Status: newclosed

fixed in changeset [15568] from clown (ATRC ccla on file)

Note: See TracTickets for help on using tickets.