This Wiki page is edited by participants of the Protocols and Formats Working Group. It does not necessarily represent consensus and it may have incorrect information or information that is not supported by other Working Group participants, WAI, or W3C. It may also have some very useful information.

ARIA/UAIG Tests

From Protocols and Formats Working Group Wiki
Jump to: navigation, search


Note: specify that all elements have accessible names set i.e., text values

http://www.w3.org/WAI/PF/aria-implementation/#keyboard-focus

a element with tabindex="-1" and a script buttun to focus it : element is removed from tab order but can receive focus by script span element with tabindex="-1" and a script buttun to focus it : element is not in tab order but can receive focus by script span element with tabindex="0" and a script button to focus it : element is in tab order and can receive focus by script a element with tabindex="0" and a script button to focus it : element is in tab order and can receive focus by script span element with tabindex="-1" : element appears in accessibility tree and has focusable state set to true span element with tabindex="0" : element appears in accessibility tree and has focusable state set to true input element type="button" with tabindex="0" : element appears in accessibility tree and has focusable state set to true input element type="button" with tabindex="-1" : element appears in accessibility tree and has focusable state set to true

http://www.w3.org/WAI/PF/aria-implementation/#keyboard-focus_tabindex

  1. 1 and #2 covered from above
  2. 3: a element with tabindex=1 followed by span with tabindex=2 followed by a with tabindex=3 : each element has a focusable state set to true and user can navigate by keyboard in sequential order
  3. 4: a element with tabindex="0" and script that informs of the element's tabindex value from the DOM element.tabindex property : element.tabindex=0

a element with tabindex="1" and script that informs of the element's tabindex value from the DOM element.tabindex property : element.tabindex=1 a element with tabindex="-1" and script that informs of the element's tabindex value from the DOM element.tabindex property : element.tabindex=-1 span element with tabindex="0" and script that informs of the element's tabindex value from the DOM element.tabindex property : element.tabindex=0 span element with tabindex="1" and script that informs of the element's tabindex value from the DOM element.tabindex property : element.tabindex=1 span element with tabindex="-1" and script that informs of the element's tabindex value from the DOM element.tabindex property : element.tabindex=-1

  1. 5 and #6: On a page having an a element with tabindex=0 and a script that sets focus to it with element.focus and a DOMFocusIn event listener which reports that focus was set : focus is successfully reported

On a page having an a element with tabindex=-1 and a script that sets focus to it with element.focus and a DOMFocusIn event listener which reports that focus was set : focus is successfully reported On a page having an a element with tabindex=1 and a script that sets focus to it with element.focus and a DOMFocusIn event listener which reports that focus was set : focus is successfully reported On a page having a span element with tabindex=0 and a script that sets focus to it with element.focus and a DOMFocusIn event listener which reports that focus was set : focus is successfully reported On a page having a span element with tabindex=-1 and a script that sets focus to it with element.focus and a DOMFocusIn event listener which reports that focus was set : focus is successfully reported On a page having a span element with tabindex=1 and a script that sets focus to it with element.focus and a DOMFocusIn event listener which reports that focus was set : focus is successfully reported

  1. 7: On an a element with tabindex=0 having a keypress event listener that reports it was fired and a keydown event listener that cancels event propagation, press a key : keypress event is not fired

On an a element with tabindex=-1 having a keypress event listener that reports it was fired and a keydown event listener that cancels event propagation, press a key : keypress event is not fired On an a element with tabindex=1 having a keypress event listener that reports it was fired and a keydown event listener that cancels event propagation, press a key : keypress event is not fired On a span element with tabindex=0 having a keypress event listener that reports it was fired and a keydown event listener that cancels event propagation, press a key : keypress event is not fired On a span element with tabindex=-1 having a keypress event listener that reports it was fired and a keydown event listener that cancels event propagation, press a key : keypress event is not fired On a span element with tabindex=1 having a keypress event listener that reports it was fired and a keydown event listener that cancels event propagation, press a key : keypress event is not fired

  1. 8: focusable cases covered by #1; p element with no tabindex attribute : focusable state is false
  2. 9: a element with focus set : focused state is true

a element with focus not set : focused state is false

  1. 10: span element with tabindex=0 and a click event listener that reports it was fired but no key event listener, tab to the element and press enter : the click event listener report is observed

span element with tabindex=1 and a click event listener that reports it was fired but no key event listener, tab to the element and press enter : the click event listener report is observed

  1. 11: @@need help with statements from David Bolter and Larry Weiss

http://www.w3.org/WAI/PF/aria-implementation/#keyboard-focus_aria-activedescendant

  1. 1: covered from tabindex section
  2. 2: div element with role="menu" and tabindex=0 and aria-activedescendant that references a descendant div element with role="menuitem", set focus on the menu : focused state is not set on the menu
  3. 3: div element with role="menu" and tabindex=0 and aria-activedescendant that references one of two descendant div elements with role=menuitem, and script that changes aria-activedescendant value of menu from one of the menuitems to the other : focused state is removed from the first menuitem and a desktop focus event is fired on the second menuitem

div element with role="menu" and tabindex=0 and aria-activedescendant referencing a descendant div element with role=menuitem, and script that removes aria-activedescendant from the menu : a desktop focus event is fired on the menu div element with role="menu" and tabindex=0 and aria-activedescendant referencing a descendant div element with role=menuitem, and script that aria-activedescendant on the menu to a non-valid id reference : a desktop focus event is fired on the menu

  1. 4: div element with role="menuitem" whose ID is referenced by the aria-activedescendant of an ancestor div element with role="menu" : focusable property is set on the menuitem

two div elements with role="menuitem", one of which has an id referenced by the aria-activedescendant of an ancestor div element with role="menu" : focused property of the referenced menuitem is set and focusable property of the the other menuitem is set

http://www.w3.org/WAI/PF/aria-implementation/#keyboard-focus_at

two focusable elements with focus event that reports focus was set, one of which is focused, use accessibility api request to change focus to the other element : focus change is reported div element with role=menu and two descendant div elements with role=menuitem" and a focus event handler that reports it received focus, and another focusable element on the page that has initial focus, use accessibility api request to set focus on one of the menuitems : the menu reports receiving focus div element with role=menu and two descendant div elements with role=menuitem" and a focus event handler that reports it received focus, and another focusable element on the page that has initial focus, use accessibility api request to set focus on one of the menuitems : a desktop focus event is fired on the accessibility tree object that corresponds to the menuitem on which focus request was made and the same accessibility tree object has the focused state set

http://www.w3.org/WAI/PF/aria-implementation/#include_elements

  1. 1:
  2. 2: @@
  3. 3: @@covered by presentation tests, and reverse by the other tests
  4. 4: a element with href attribute : element appears in the AAPI tree

Span element with tabindex=0 : element appears in the AAPI tree Div element with role=menuitem referenced by aria-activedescendant of ancestor div with role=menu : menuitem appears in the AAPI tree

  1. 5: @@under rewrite
  2. 6: @@under rewrite
  3. 7: @@under rewrite

http://www.w3.org/WAI/PF/aria-implementation/#exclude_elements

covered by presentation tests

http://www.w3.org/WAI/PF/aria-implementation/#mapping_conflicts

input with type=text and role=spinbutton : role is spinbutton input with type=checkbox and role=spinbutton : role is spinbutton input with type=checkbox but checked attribute not set and aria-checked=true : checked state is false

other testable statements are HTML 5

http://www.w3.org/WAI/PF/aria-implementation/#mapping_nodirect

mostly covered by mapping table div element with role="grid checkbox" : • MSAA: {can't meet} • IA2: AAPI tree element is ROLE_SYSTEM_TABLE and xml-roles is "grid checkbox" • UIA: AriaRole property is "grid checkbox" and AAPI tree element is DataGrid • ATK/SPI: AAPI tree element is ROLE_ TABLE and xml-roles is "grid checkbox" • AXAPI: @@

http://www.w3.org/WAI/PF/aria-implementation/#mapping_role

div element with role="foobar checkbox" : element mapped as for checkbox div element with role="checkbox foobar" : element mapped as for checkbox

  1. 1: @@about scripts, covered by other tests
  2. 2: @@abstract covered
  3. 3: table element with role="foo" : element mapped as for table

Input type="text" with role="bar" : element mapped as for text input

  1. 4: @@presentation
  2. 5: @@covered above

http://www.w3.org/WAI/PF/aria-implementation/#mapping_state-property

input type="checkbox" aria-labelledby referencing a div : input element is exposed as a checkbox and accessible name is content of the referenced div

http://www.w3.org/WAI/PF/aria-implementation/#mapping_additional_nd_name

covered by text alternatives tests HTML note: img with src and role=presentation and tabindex=-1 (to make it focusable and therefore appear in the accessibility tree) : accessible name is empty string img with src and alt="" : accessible name is empty string img with src and aria-label="" : accessible name is empty string img with src and aria-labelledby="" : accessible name is empty string img with src and title="" : accessible name is empty string img with src and no other attributes : accessible name is null

http://www.w3.org/WAI/PF/aria-implementation/#mapping_additional_widget-value

(for the Exposure of aria-valuenow tests)

Div with role="spinbutton" with aria-valuenow="5", aria-valuemin="0" and aria-valuemax="10", and valuetext="nurthen" : value is "nurthen" Div with role="spinbutton" with aria-valuenow="5", aria-valuemin="0" and aria-valuemax="10", and no aria-valuetext : value is "5"

http://www.w3.org/WAI/PF/aria-implementation/#mapping_additional_relations_reverse_relations

div with role="button" with aria-controls referencing ID of a div with role="document" : [IAccessible2] document has IA2_RELATION_CONTROLLED_BY that references the button [AT-SPI] document has RELATION_CONTROLLED_BY that references the button div with role="button" with aria-describedby referencing ID of a div with role="document" : [IAccessible2] document has IA2_RELATION_DESCRIPTION_FOR that references the button [AT-SPI] document has RELATION_DESCRIPTION_FOR that references the button div with role="button" with aria-flowto referencing ID of a div with role="document" : [IAccessible2] document has IA2_RELATION_FLOW_FROM that references the button [AT-SPI] document has RELATION_FLOW_FROM that references the button div with role="button" with aria-labelledby referencing ID of a div with role="document" : [IAccessible2] document has IA2_RELATION_LABEL_FOR that references the button [AT-SPI] document has RELATION_LABEL_FOR that references the button div with role="button" with aria-owns referencing ID of a div with role="document" : [IAccessible2] document has IA2_RELATION_NODE_CHILD_OF that references the button [AT-SPI] document has RELATION_NODE_CHILD_OF that references the button

label element with value of "foo" and for attribute referencing an input element with type="text". The input element also has an aria-labelledby that references a div with value of "baz" : labelledby of input references the div element with value "baz" only.

http://www.w3.org/WAI/PF/aria-implementation/#mapping_additional_position

@@note the following need AAPI representations of the expected results wrt posinset and setsize

div element with role="tree" which has a child div with role="treeitem" which in turn has a child div with role="group" which in turn has a child div with role="treeitem" : level of innermost treeitem is 2 div element with role="tree" which has an aria-owns property referencing ID of another div with role="treeitem" which in turn has an aria-owns property referencing ID of another div with role="group" which in turn has an aria-owns property referencing ID of another div with role="treeitem" : level of last treeitem is 2

div element with role="tree" which has a child div with role="treeitem" which in turn has a child div with role="group" which in turn has two child divs with role="treeitem" : first innermost treeitem has posinset of 1 and setsize of 2, and second innermost treeitem has posinset of 2 and setsize of 2 div element with role="tree" which has an aria-owns property referencing ID of another div with role="treeitem" which in turn has an aria-owns property referencing ID of another div with role="group" which in turn has an aria-owns property referencing ID of another div with role="treeitem" : first owned treeitem has posinset of 1 and setsize of 2, and second owned treeitem has posinset of 2 and setsize of 2

http://www.w3.org/WAI/PF/aria-implementation/#mapping_events_state-change

autogenerate for table: test files have a button controlling a div with appropriate role and triggering the respective change

http://www.w3.org/WAI/PF/aria-implementation/#mapping_events_visibility

For each row in first table:

Div element with role="document" and aria-live="assertive" and aria-relevant="all" and button to [insert | delete | text] in the div : event fired as per table

2nd table @@ need to figure out if ul element is the right target for the events, based on clarifying definition of "subtree" @@ for Mac testing, add test for when the elements of interest are contained in a live region

first row ul element which contains at two li elements, and a button that hides the ul element by setting style="display:none" : events fired on the ul element as per table ul element which contains at two li elements, and a button that hides the ul element by setting style="visibility:hidden" : events fired on the ul element as per table ul element which contains at two li elements, and a button that hides the ul element by setting aria-hidden="true" : events fired on the ul element as per table

second row ul element which contains at two li elements, and a button that removes the ul element from the DOM : events fired on the ul element as per table

third row ul element which contains at two li elements, and a button that shows the ul element by setting style="display:block" : events fired on the ul element as per table ul element which contains at two li elements, and a button that shows the ul element by setting style="visibility:visible" : events fired on the ul element as per table ul element which contains at two li elements, and a button that shows the ul element by setting aria-hidden="false" : events fired on the ul element as per table

fourth row div element with role="document" and button that inserts a ul element with two li child elements as a child of the div : events fired on the div element as per table

fifth row two div elements with role="region", one of which contains a ul element with two li child elements, and button that moves the ul element and its children to the other div : events fired on both div elements as per table

sixth row div element with role="document" which contains a ul element with two li child elements and button that replaces the ul with a p element : events fired on the div element as per table

http://www.w3.org/WAI/PF/aria-implementation/#mapping_events_selection

single selection: div element with role="listbox" and child div with role="option" and tabindex="0", set focus to the option : selection event fired per API table element with role="grid" with a child tr with role="row" with two child td elements with role="gridcell" and tabindex="0" and text contents, set focus on the first one : selection event fired per API on the gridcell table element with role="grid" with a child tr with role="row" and tabindex="0" with two child td elements with role="gridcell" and text contents, set focus on the row : selection event fired per API on the row table element with role="tablist" with a child tr with role="presentation" with two child td elements with role="tab" and tabindex="0" and text contents, set focus on the first one : selection event fired per API on the gridcell

multi selection: div element with role="listbox" and aria-multiselectable="true" having two child div elements with role="option", the first one having aria-selected="true" and the second having aria-selected="false" and onload handler for page that sets aria-selected="true" on the second option : selection events fired per API on the second option div element with role="listbox" and aria-multiselectable="true" having two child div elements with role="option" and aria-selected="true" and onload handler for page that sets aria-selected="false" on the second option : selection events fired per API on the second option div element with role="listbox" and aria-multiselectable="true" having two child div elements with role="option" and tabindex="0" and aria-selected="false" and onload handler for page that sets aria-selected="true" on the second option : selection events fired per API on the second option div element with role="listbox" and aria-multiselectable="true" having three child div elements with role="option" and aria-selected="false" , click on the first option, then shift-click on the third option and script that enables focus with click on options and shift-click for range selection : selection events fired per API on all three options @@ this seems to be an impossible condition, just separate events

http://www.w3.org/WAI/PF/aria-implementation/#mapping_events_menus

div element with role="menubar" and child div with role="menuitem" with aria-haspop="true" and aria-owns with value referencing ID of a div outside the menubar whose role="menu" and style="display:none:" containing two divs with role="item" and text contents, with onload script that sets style="display:block" on the menubar : menu start events fired per API on the menubar div div element with role="menubar" and child div with role="menuitem" with aria-haspop="true" and aria-owns with value referencing ID of a div outside the menubar whose role="menu" and style="display:none:" containing two divs with role="item" and text contents, with onload script that sets style="display:block" on the menubar and sets focus on the first item in the menu : focus events fired per API on the item div div element with role="menubar" and child div with role="menuitem" with aria-haspop="true" and aria-owns with value referencing ID of a div outside the menubar whose role="menu" and style="display:none:" containing two divs with role="item" and text contents, with onload script that sets style="display:block" on the menubar and sets focus on the first item in the menu : popupstart events fired per API on the menu div div element with role="menubar" and child div with role="menuitem" with aria-haspop="true" and aria-owns with value referencing ID of a div outside the menubar whose role="menu" and style="display:block:" containing two divs with role="item" and text contents, with onload script that sets style="display:none" on the internal menubar and sets focus on an element outside the menu : menupopupend and menuend events fired per API on the outer menubar div

http://www.w3.org/WAI/PF/aria-implementation/#document-handling_css-selectors

two div elements with aria-haspopup="true", and style rule on page that says div[aria-haspop="true"] {background-color : red} : the background of div elements is red two div elements with aria-haspopup="false", and style rule on page that says div[aria-haspop="true"] {background-color : red} : the background of div elements is the default page background two div elements with aria-haspopup="true", and style rule on page that says div[aria-haspop="true"] {background-color : red}, and script that sets aria-haspopup to false on the second the div elements : the background of second div element is the default page background

http://www.w3.org/WAI/PF/aria-implementation/#document-handling_author-errors

on a user agent that has passed a test resolving aria-describedby div element with aria-describedby="broken" where there is no element with an ID of "broken" on the page : no relationship for describedby exposed and no accessible description exposed div element with aria-describedby="broken brokenmore" where there is no element with an ID of "broken" nor of "brokenmore" on the page : no relationship for describedby exposed and no accessible description exposed div element with aria-describedby="broken worky" where there is no element with an ID of "broken" on the page but there is a div element with ID "worky" and text "this works": describedby references worky only and accessible description is "this works"