Test Plan To Test XUL Elements For Accessibility

Approach:
The Test Cases are written in JavaScript and XUL. Below table shows the expected results of test case and Inspect tool.

Note: Before executing the test cases be sure to add the following line to your prefs.js file.
user_pref("signed.applets.codebase_principal_support", true);
Note: Make sure you are running the test case in MfcEmbed or any Embedding application.

The test cases can be run automated only. you cannot run them independently.

If you have Mozilla trunk build on your machine you can find the test cases at
mozilla_root/embedding/qa/jstests/accessibility/xul/

Tests can be run automatically using XUL Framework.
Download the framework from
http://slip.mcom.com/projects/embed/docs/framewrk.zip

Install the framework locally and open Framewrk.xul in content folder. That page will give you all the details how to register the test cases and run them.

If you dont have the mozilla trunk build on your machine and want to run test cases automatically then go to
http://www.mozilla.org/quality/embed/jstests/accessibility/xul/
and save each testcase locally.
Note: You cannot do directory listing on Mozilla. The filenames of the test cases are mentioned in the below table under "Test Case".

XUL Element
Test Case
Expected Results Of Test Case
Expected Results Of Inspect
Arrowscrollbox
xularrowscrollbox.xul
The Node you selected is not an accessible node
Cannot bring focus on to the Arrowscrollbox Node
Box
xulbox.xul
The Node you selected is not an accessible node
Cannot bring focus on to the Box Node
Button
xulbutton.xul
Name: Normal
Role:  43
(ROLE_PUSHBUTTON)
State: 1048580
(STATE_FOCUSED + STATE_FOCUSABLE)
Value: NS_ERROR_NOT_IMPLEMENTED
accTakeFocus(): Focused
accFocused: Focused
accNumActions: 1
getAccActionName(): Press
accDoAction(): Button Pressed
accKeyboardShortcut: Alt+n
Name: Normal
Role: push button
State: focused, focusable
Value: none[false]
DefAction: Press
Kbshortcut: Alt+n
Checkbox
xulcheckboxchecked.xul
Name: Checkbox Label
Role:  44
(ROLE_CHECKBOX)
State: 1048596
(STATE_FOCUSED + STATE_CHECKED + STATE_FOCUSABLE)
Value: NS_ERROR_NOT_IMPLEMENTED
accTakeFocus(): Focused
accFocused: Focused
accNumActions: 1
getAccActionName(): uncheck
accDoAction(): Check Box Not Checked
accKeyboardShortcut: Alt+c
Name: Checkbox Label
Role: check box
State: focused, checked, focusable
Value: none[false]
DefAction: uncheck
Kbshortcut: Alt+c

xulcheckboxunchecked.xul
Name: Checkbox Label
Role:  44
(ROLE_CHECKBOX)
State: 1048580
(STATE_FOCUSED + STATE_FOCUSABLE)
Value: NS_ERROR_NOT_IMPLEMENTED
accTakeFocus(): Focused
accFocused: Focused
accNumActions: 1
getAccActionName(): check
accDoAction(): Check Box Checked
accKeyboardShortcut: Alt+b
Name: Checkbox Label
Role: check box
State:
focused, focusable
Value: none[false]
DefAction: check
Kbshortcut: Alt+b
Deck xuldeck.xul
The Node you selected is not an accessible node
Cannot bring focus on to the Deck Node
Description
xuldescription.xul
Name: Testing XUL Description for Accessibility..
Role:  42
(ROLE_TEXT)
State: 64
(STATE_READONLY)
Value: NS_ERROR_NOT_IMPLEMENTED
accKeyboardShortcut: Alt+d
Name: Testing XUL Description for Accessibility..
Role: editable text
State: readonly
Value: none[false]
Kbshortcut: Alt+d
Grid
xulgrid.xul
The Node you selected is not an accessible node
Cannot bring focus on to the Grid Node
Groupbox
xulgroupbox.xul
Name: Answer
Role:  20
(ROLE_GROUPING)
State: 0
(STATE_NORMAL)
Value: NS_ERROR_NOT_IMPLEMENTED
accKeyboardShortcut: Alt+g
Name: Answer
Role: grouping
State: normal
Value: none[false]
Kbshortcut: Alt+g
Image
xulimage.xul
The Node you selected is not an accessible node
Cannot bring focus on to the Image Node
Label
xullabel.xul
Name: Click here:
Role:  42
(ROLE_TEXT)
State: 64
(STATE_READONLY)
Value: NS_ERROR_NOT_IMPLEMENTED
accKeyboardShortcut: Alt+h
Name: Click here:
Role: editable text
State: readonly
Value: none[false]
Kbshortcut: Alt+h
Listbox
xullistbox.xul
Name: Empty String
Role: 33
(ROLE_LIST)
State: 1048644
(STATE_FOCUSED + STATE_READONLY  + STATE_FOCUSABLE)
Value: NS_ERROR_FAILURE
accTakeFocus(): Focused
accFocused: Focused
accKeyboardShortcut: Alt+l
Name: ""
Role: list
State: focused, readonly, focusable
Value: Second Item
Kbshortcut: Alt+l
Listitem
xullistitem.xul
Name: First Item
Role: 34
(ROLE_LISTITEM)
State: 3145734
(STATE_SELECTED + STATE_FOCUSED + STATE_FOCUSABLE + STATE_SELECTABLE)
Bugzilla bug# 152956
Value: NS_ERROR_NOT_IMPLEMENTED
accTakeFocus(): Focused
accFocused: Focused
accNumActions: 1
getAccActionName(): Select
accDoAction(): List Item Selected
accKeyboardShortcut: I
Name: First Item
Role: list item
State: selected, focused, focusable, selectable
Value: none[false]
DefAction: Select
Kbshortcut: I
Menubar
xulmenubar.xul
Name: menubar
Role: 2
(ROLE_MENUBAR)
State: 0
(STATE_NORMAL)
Value: NS_ERROR_NOT_IMPLEMENTED
accKeyboardShortcut: Alt+b
Name: menubar
Role: menu bar
State: normal
Value: none[false]
Kbshortcut: Alt+b
Menuitem
xulmenuitem.xul
Name: Open
Role: 12
(ROLE_MENUITEM)
State: 1146884
(STATE_INVISIBLE + STATE_OFFSCREEN + STATE_FOCUSABLE + STATE_FOCUSED)
Value: NS_ERROR_NOT_IMPLEMENTED
accTakeFocus(): Focused
accFocused: Focused
accNumActions: 1
getAccActionName(): Select
accDoAction(): Menu Item Selected
accKeyboardShortcut: t
Name: Open
Role: menu item
State: focusable, focused
Value: none[false]
DefAction: Select
Kbshortcut: t
Menulist
xulmenulist.xul
Name: Second Menu Item
Role: 46
(ROLE_COMBOBOX)
State: 1074791492
(STATE_FOCUSED + STATE_READONLY + STATE_COLLAPSED + STATE_FOCUSABLE + STATE_HASPOPUP)
Value: Second Menu Item
accTakeFocus(): Focused
accFocused: Focused
accKeyboardShortcut: Alt+m
Name: Second Menu Item
Role: combo box
State: focused, read only, colapsed, focusable
Value: Second Menu Item
Kbshortcut: Alt+m
Progressmeter
xulprogressmeter.xul
Name: Determinate Progress Meter:
Role:  48
(ROLE_PROGRESSBAR)
State: 0
(STATE_NORMAL)
Value: 50%
accKeyboardShortcut: Alt+p
Name: Determinate Progress Meter:
Role: progress bar
State: normal
Value: 50%
Kbshortcut: Alt+p
Radio Button
xulradiobuttonchecked.xul
Name: First Radio Button
Role:  45
(ROLE_RADIOBUTTON)
State: 1048596
(STATE_FOCUSED + STATE_CHECKED + STATE_FOCUSABLE)
Value: NS_ERROR_NOT_IMPLEMENTED
accTakeFocus(): Focused
accFocused: Focused
accNumActions: 1
getAccActionName(): Select
accDoAction(): Radio Button Not checked
accKeyboardShortcut: Alt+r
Name: First Radio Button
Role: radio button
State: focused, checked, focusable
Value: none[false]
DefAction: Select
Kbshortcut: Alt+r

xulradiobuttonunchecked.xul
Name: First Radio Button
Role:  45
(ROLE_RADIOBUTTON)
State: 1048580
(STATE_FOCUSED + STATE_FOCUSABLE)
Value: NS_ERROR_NOT_IMPLEMENTED
accTakeFocus(): Focused
accFocused: Focused
accNumActions: 1
getAccActionName(): Select
accDoAction(): Radio Button Checked
accKeyboardShortcut: Alt+r
Name: First Radio Button
Role: radio button
State: focusable
Value: none[false]
DefAction: Select
Kbshortcut: Alt+r
Radiogroup
xulradiogroup.xul
Name: Empty String
Role:  20
(ROLE_RADIOBUTTON)
State: 0
(STATE_NORMAL)
Value: NS_ERROR_NOT_IMPLEMENTED
accKeyboardShortcut: Alt+a
Name: ""
Role: grouping
State: normal
Value: none[false]
Kbshortcut: Alt+a
Scrollbar
xulscrollbar.xul
The Node you selected is not an accessible node
Cannot bring focus on to the Scrollbar Node
Stack
xulstack.xul
The Node you selected is not an accessible node
Cannot bring focus on to the Stack Node
Tab[Tabbox]
xultab.xul
Name: Mail
Role: 37
(ROLE_PAGETAB)
State: 0
(STATE_NORMAL)
Value: NS_ERROR_NOT_IMPLEMENTED
accNumActions: 1
getAccActionName(): Switch
accDoAction(): Tab Switched
Bugzilla Bug# 153193
[After the bug is fixed, modify the test case]
accKeyboardShortcut: Alt+t
Name: Mail
Role: page tab
State: normal
Value: none[false]
DefAction: Switch
Kbshortcut: Alt+t
Tabbox
xultabbox.xul
Name: Empty String
Role:  9
(ROLE_WINDOW)
State: 0
(STATE_NORMAL)
Value: NS_ERROR_NOT_IMPLEMENTED
accKeyboardShortcut: Alt+b
Name: ""
Role: window
State: normal
Value: none[false]
Kbshortcut: Alt+b
Tabpanel[Tabbox]
xultabpanel.xul
The Node you selected is not an accessible node
Cannot bring focus on to the Tabpanel Node
Tabpanels[Tabbox]
xultabpanels.xul
Name: NS_ERROR_NOT_IMPLEMENTED
Role: 38
(ROLE_PROPERTYPAGE)
State: 0
(STATE_NORMAL)
Value: NS_ERROR_NOT_IMPLEMENTED
accKeyboardShortcut: Alt+p
Name: none[false]
Role: property page
State: normal
Value: none[false]
Kbshortcut: Alt+p

Tabs[Tabbox]
xultabs.xul
Name: Empty String
Role: 60
(ROLE_PAGETABLIST)
State: 0
(STATE_NORMAL)
Value: Empty String
accKeyboardShortcut: Alt+t
Name: ""
Role: page tab list
State: normal
Value: ""
Kbshortcut: Alt+t
Textbox
xultextbox.xul
Name: null
Role:  42
(ROLE_TEXT)
State: 1048580
(STATE_FOCUSED + STATE_FOCUSABLE)
Value: Default text...
accTakeFocus(): Focused
accFocused: Focused
accKeyboardShortcut: Alt+D
Name: ""
Role: editable text
State: focused, focusable
Value: Default text...
Kbshortcut: Alt+D
Toolbar
xultoolbar.xul
The Node you selected is not an accessible node
Cannot bring focus on to the Toolbar Node
Toolbox
xultoolbox.xul
The Node you selected is not an accessible node
Cannot bring focus on to the Toolbox Node
Tree
xultree.xul
Name: Empty String
Role:  35
(ROLE_OUTLINE)
State: 1048644
(STATE_FOCUSED + STATE_READONLY  + STATE_FOCUSABLE)
Value: Empty String
accTakeFocus(): Focused
accFocused: Focused
accKeyboardShortcut: Alt+t
Name: ""
Role: outline
State: focused, readonly, focusable
Value: ""
Kbshortcut: Alt+t
Treecol[Tree]
xultreecol.xul
Name: Sender
Role:  25
(ROLE_COLUMNHEADER)
State: 64
(STATE_READONLY)
Value: NS_ERROR_NOT_IMPLEMENTED
accNumActions: 1
getAccActionName(): Click
accDoAction(): Header Clicked
accKeyboardShortcut: Alt+c
Name: Sender
Role: column header
State: read only
Value: none[false]
DefAction: Click
Kbshortcut: Alt+c
Treecols[Tree]
xultreecols.xul
Name: Empty String
Role:  33
(ROLE_LIST)
State: 64
(STATE_READONLY)
Value: NS_ERROR_NOT_IMPLEMENTED
accKeyboardShortcut: Alt+t
Name: ""
Role: list
State: read only
Value: none[false]
Kbshortcut: Alt+t
Treecell[Tree]
Treeitem
[Tree]
Treerow[Tree]
All the above are same for accessibility.
xultreeitem.xul
Name: joe@somewhere.com
Role:  36
(ROLE_OUTLINEITEM)
State: 3145732
(STATE_SELECTABLE + STATE_FOCUSED + STATE_FOCUSABLE)
Value: 0
accTakeFocus(): Focused
accFocused: Focused
accKeyboardShortcut: Alt+i
Name: joe@somewhere.com
Role: outline item
State: selected, selectable, focused, focusable
Value: 0
Kbshortcut: Alt+i


Document Prepared by: Dharma Sirnapalli on 06/26/02.