Test Plan To Test HTML Elements For Accessibility

Approach:
The Test Cases are written in JavaScript and HTML. Below table shows the expected results of test cases 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 independently or automated.
You can run the test cases independently by clicking on the Test Case in the below table.

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

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/html/  
and save each test case locally.
Note: You cannot do directory listing on Mozilla. The filenames of the test cases are mentioned in the below table under "Test Case".

HTML Element
Test Case
Expected Results Of Test Case
Expected Results Of Inspect
Anchor
htmlanchor.html
Name: External Link
Role: 30
(ROLE_LINK)
State: 13631492
(STATE_FOCUSED +  STATE_FOCUSABLE + STATE_LINKED + STATE_TRAVERSED
(you will have to click the link the first time you are running the test case)  
Value: http://home.netscape.com
accTakeFocus(): Focused
accFocused: Focused
accNumActions: 1
getAccActionName(): Jump
accKeyboardShortcut: Alt+a
Name: External Link
Role: link
State: focused, focusable, linked, traversed
(you will see traversed only if you click the link and go to new page and click on back button to come to original page)
Value: http://home.netscape.com
DefAction: Jump
Kbshortcut: Alt+a

htmlanchortext.html
Name: External Link
Role: 42
(ROLE_TEXT)
State: 15728708
(STATE_FOCUSED + STATE_READONLY +  STATE_FOCUSABLE + STATE_SELECTABLE + STATE_LINKED + STATE_ TRAVERSED)
Value: http://home.netscape.com
accTakeFocus(): Focused
accNumActions: 1
getAccActionName(): Jump
accKeyboardShortcut: Alt+a
Name: External Link
Role: editable text
State: focused, read only, focusable, selectable, linked, traversed
(you will see traversed only if you click the link and go to new page and click on back button to come to original page)
Value: http://home.netscape.com
DefAction: Jump
Kbshortcut: Alt+a
Button
htmlbutton.html
Name: Submit
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+b
Name: Submit
Role: push button
State: focused, focusable
Value: none[false]
DefAction: Press
Kbshortcut: Alt+b

htmlbuttontext.html
Name: Submit
Role: 42
(ROLE_TEXT)
State: 2097216
(STATE_READONLY + STATE_SELECTABLE)
Value: NS_ERROR_NOT_IMPLEMENTED
Button Text Node is not accessible through Inspect. Through API however its accessible. Theoretically it should not be accessible but its left open in API so that it may be useful in future.
Checkbox
htmlcheckboxchecked.html
Name: null
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: ''''
Role: check box
State: focused, checked, focusable
Value: none[false]
DefAction: Uncheck
Kbshortcut: Alt+c

htmlcheckboxunchecked.html
Name: null
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+c
Name: ''''
Role: check box
State: focused, focusable
Value: none[false]
DefAction: Check
Kbshortcut: Alt+c
Fieldset
htmlfieldsetwithlegend.html
Name: Customer Identification
Role: 20
(ROLE_GROUPING)
State: 0
(STATE_NORMAL)
Value: NS_ERROR_NOT_IMPLEMENTED
accKeyboardShortcut: Alt+f
Name: Customer Identification
Role: grouping
State: normal
Value: none[false]
Kbshortcut: Alt+f

htmlfieldsetwithoutlegend.html
Name: Empty String
Role: 20
(ROLE_GROUPING)
State: 0
(STATE_NORMAL)
Value: NS_ERROR_NOT_IMPLEMENTED
accKeyboardShortcut: Alt+f
Name: ""
Role: grouping
State: normal
Value: none[false]
Kbshortcut: Alt+f
Radio Button
htmlradiobuttonchecked.html
Name: null
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 Unchecked
accKeyboardShortcut: Alt+r
Name: ''''
Role: radio button
State: focused, checked, focusable
Value: none[false]
DefAction: Select
Kbshortcut: Alt+r

htmlradiobuttonunchecked.html
Name: null
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: ''''
Role: radio button
State: focused, focusable
Value: none[false]
DefAction: Select
Kbshortcut: Alt+r
Select Node [Select Combobox]
htmlselect.html
Name: null
Role: 46
(ROLE_COMBOBOX)
State: 1074791492
(STATE_FOCUSED + STATE_READONLY + STATE_COLLAPSED +  STATE_FOCUSABLE + STATE_HASPOPUP)
Value: Red
accTakeFocus(): Focused
accFocused: Focused
accKeyboardShortcut: Alt+s
Name:  ""
Role: combo box
State: focused, readonly, collapsed, focusable
Value: Red
Kbshortcut: Alt+s
Option Node [Select Combobox]
htmlselectoption.html
Name: Red
Role: 34
(ROLE_LISTITEM)
State: 3145734
(STATE_SELECTED + STATE_FOCUSED + STATE_FOCUSABLE + STATE_SELECTABLE)
Value: NS_ERROR_NOT_IMPLEMENTED
accTakeFocus(): Focused
accFocused: Focused
accNumActions: 1
getAccActionName(): Select
accKeyboardShortcut: Alt+o
Name:  Red
Role: list item
State: selected, focused, focusable, selectable
Value: none[false]
DefAction: Select
Kbshortcut: Alt+o
Table
htmltable.html
Name: Test Table
Role: 24
(ROLE_TABLE)
State: 0
(STATE_NORMAL)
Value: NS_ERROR_NOT_IMPLEMENTED
Name:  Test Table
Role: table
State: normal
Value: none[false]

htmltablecaption.html
The Node you selected is not an accessible node
Cannot bring focus on to the Table caption.

htmltablecaptiontext.html
Name: Test Table
Role: 42
(ROLE_TEXT)
State: 2097216
(STATE_READONLY + STATE_SELECTABLE)
Value: NS_ERROR_NOT_IMPLEMENTED
Name: Test Table
Role: editable text
State: read only, selectable
Value: none[false]

htmltablecell.html Name: null
Role: 29
(ROLE_CELL)
State: 0
(STATE_NORMAL)
Value: NS_ERROR_NOT_IMPLEMENTED
Name:  ''''
Role: cell
State: normal
Value: none[false]

htmltablecelltext.html
Name: Row1, Col1
Role: 42
(ROLE_TEXT)
State: 2097216
(STATE_READONLY + STATE_SELECTABLE)
Value: NS_ERROR_NOT_IMPLEMENTED
Name:  Row1, Col1
Role: editable text
State: read only, selectable
Value: none[false]

htmltablerow.html
The Node you selected is not an Accessible Node
Cannot bring focus on to the table row.
Text Area
htmltextarea.html
Name: null
Role: 42
(ROLE_TEXT)
State: 1048580
(STATE_FOCUSED + STATE_FOCUSABLE)
Value: Default text...
accTakeFocus(): Focused
accFocused: Focused
accNumActions: NS_ERROR_NOT_IMPLEMENTED
accKeyboardShortcut: Alt+t
Name:  ''''
Role: editable text
State: focused, focusable
Value: Default text...
Kbshortcut: Alt+t


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