From 6d914c4e43c1e9604c70e029acde048bac8cbfb3 Mon Sep 17 00:00:00 2001 From: Valerie Young Date: Thu, 4 Jun 2026 18:26:19 -0700 Subject: [PATCH 1/4] Core-AAM: Add remaining of role tests --- core-aam/aamtests/role/alertdialog.py | 32 +++++++++++++ core-aam/aamtests/role/cell.py | 37 ++++++++++++++ core-aam/aamtests/role/code-role.py | 35 ++++++++++++++ core-aam/aamtests/role/columnheader.py | 37 ++++++++++++++ core-aam/aamtests/role/comment.py | 34 +++++++++++++ core-aam/aamtests/role/dialog.py | 31 ++++++++++++ core-aam/aamtests/role/form.py | 36 ++++++++++++++ core-aam/aamtests/role/grid.py | 48 +++++++++++++++++++ core-aam/aamtests/role/gridcell.py | 39 +++++++++++++++ core-aam/aamtests/role/image.py | 34 +++++++++++++ core-aam/aamtests/role/img.py | 34 +++++++++++++ core-aam/aamtests/role/link.py | 10 +++- core-aam/aamtests/role/listbox.py | 37 ++++++++++++++ core-aam/aamtests/role/listbox_in_combobox.py | 37 ++++++++++++++ core-aam/aamtests/role/log.py | 44 +++++++++++++++++ core-aam/aamtests/role/mark.py | 36 ++++++++++++++ core-aam/aamtests/role/math-role.py | 32 +++++++++++++ core-aam/aamtests/role/menu.py | 36 ++++++++++++++ core-aam/aamtests/role/menubar.py | 36 ++++++++++++++ core-aam/aamtests/role/meter.py | 36 ++++++++++++++ core-aam/aamtests/role/option_in_combobox.py | 35 ++++++++++++++ core-aam/aamtests/role/progressbar.py | 36 ++++++++++++++ core-aam/aamtests/role/rowgroup.py | 30 ++++++++++++ core-aam/aamtests/role/rowheader.py | 34 +++++++++++++ core-aam/aamtests/role/scrollbar.py | 36 ++++++++++++++ core-aam/aamtests/role/searchbox.py | 39 +++++++++++++++ core-aam/aamtests/role/separator_focusable.py | 36 ++++++++++++++ core-aam/aamtests/role/slider.py | 36 ++++++++++++++ core-aam/aamtests/role/spinbutton.py | 36 ++++++++++++++ core-aam/aamtests/role/status.py | 42 ++++++++++++++++ core-aam/aamtests/role/suggestion.py | 35 ++++++++++++++ core-aam/aamtests/role/tab.py | 34 +++++++++++++ core-aam/aamtests/role/table.py | 42 ++++++++++++++++ core-aam/aamtests/role/tablist.py | 37 ++++++++++++++ core-aam/aamtests/role/textbox.py | 36 ++++++++++++++ core-aam/aamtests/role/textbox_multiline.py | 36 ++++++++++++++ core-aam/aamtests/role/time-role.py | 36 ++++++++++++++ core-aam/aamtests/role/tree.py | 36 ++++++++++++++ core-aam/aamtests/role/treegrid.py | 39 +++++++++++++++ 39 files changed, 1391 insertions(+), 1 deletion(-) create mode 100644 core-aam/aamtests/role/alertdialog.py create mode 100644 core-aam/aamtests/role/cell.py create mode 100644 core-aam/aamtests/role/code-role.py create mode 100644 core-aam/aamtests/role/columnheader.py create mode 100644 core-aam/aamtests/role/comment.py create mode 100644 core-aam/aamtests/role/dialog.py create mode 100644 core-aam/aamtests/role/form.py create mode 100644 core-aam/aamtests/role/grid.py create mode 100644 core-aam/aamtests/role/gridcell.py create mode 100644 core-aam/aamtests/role/image.py create mode 100644 core-aam/aamtests/role/img.py create mode 100644 core-aam/aamtests/role/listbox.py create mode 100644 core-aam/aamtests/role/listbox_in_combobox.py create mode 100644 core-aam/aamtests/role/log.py create mode 100644 core-aam/aamtests/role/mark.py create mode 100644 core-aam/aamtests/role/math-role.py create mode 100644 core-aam/aamtests/role/menu.py create mode 100644 core-aam/aamtests/role/menubar.py create mode 100644 core-aam/aamtests/role/meter.py create mode 100644 core-aam/aamtests/role/option_in_combobox.py create mode 100644 core-aam/aamtests/role/progressbar.py create mode 100644 core-aam/aamtests/role/rowgroup.py create mode 100644 core-aam/aamtests/role/rowheader.py create mode 100644 core-aam/aamtests/role/scrollbar.py create mode 100644 core-aam/aamtests/role/searchbox.py create mode 100644 core-aam/aamtests/role/separator_focusable.py create mode 100644 core-aam/aamtests/role/slider.py create mode 100644 core-aam/aamtests/role/spinbutton.py create mode 100644 core-aam/aamtests/role/status.py create mode 100644 core-aam/aamtests/role/suggestion.py create mode 100644 core-aam/aamtests/role/tab.py create mode 100644 core-aam/aamtests/role/table.py create mode 100644 core-aam/aamtests/role/tablist.py create mode 100644 core-aam/aamtests/role/textbox.py create mode 100644 core-aam/aamtests/role/textbox_multiline.py create mode 100644 core-aam/aamtests/role/time-role.py create mode 100644 core-aam/aamtests/role/tree.py create mode 100644 core-aam/aamtests/role/treegrid.py diff --git a/core-aam/aamtests/role/alertdialog.py b/core-aam/aamtests/role/alertdialog.py new file mode 100644 index 00000000000000..24f48bf01f23b6 --- /dev/null +++ b/core-aam/aamtests/role/alertdialog.py @@ -0,0 +1,32 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-alertdialog + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_ALERT + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.ALERT + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXGroup +# # AXSubrole: AXApplicationAlertDialog + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_DIALOG +# # Event: EVENT_SYSTEM_ALERT: . + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Pane diff --git a/core-aam/aamtests/role/cell.py b/core-aam/aamtests/role/cell.py new file mode 100644 index 00000000000000..6d978e1cda42f7 --- /dev/null +++ b/core-aam/aamtests/role/cell.py @@ -0,0 +1,37 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-cell + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_TABLE_CELL + # Interface: TableCell + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.TABLE_CELL + assert atspi.Accessible.get_table_cell(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXCell +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_CELL +# # Interface: IAccessibleTableCell + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: DataItem +# # Localized Control Type: item +# # Control Pattern: GridItem +# # Control Pattern: TableItem diff --git a/core-aam/aamtests/role/code-role.py b/core-aam/aamtests/role/code-role.py new file mode 100644 index 00000000000000..a442f06818b97b --- /dev/null +++ b/core-aam/aamtests/role/code-role.py @@ -0,0 +1,35 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-code + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_STATIC + # Object Attribute: xml-roles:code + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.STATIC + assert "xml-roles:code" in atspi.Accessible.get_attributes_as_array(node) + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXGroup +# # AXSubrole: AXCodeStyleGroup + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: IA2_ROLE_TEXT_FRAME +# # Object Attribute: xml-roles:code + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Text +# # Localized Control Type: code diff --git a/core-aam/aamtests/role/columnheader.py b/core-aam/aamtests/role/columnheader.py new file mode 100644 index 00000000000000..e065e5fd1af1e9 --- /dev/null +++ b/core-aam/aamtests/role/columnheader.py @@ -0,0 +1,37 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-columnheader + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_COLUMN_HEADER + # Interface: TableCell + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.COLUMN_HEADER + assert atspi.Accessible.get_table_cell(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXCell +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_COLUMNHEADER +# # Interface: IAccessibleTableCell + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: DataItem +# # Localized Control Type: column header +# # Control Pattern: GridItem +# # Control Pattern: TableItem diff --git a/core-aam/aamtests/role/comment.py b/core-aam/aamtests/role/comment.py new file mode 100644 index 00000000000000..e71a019e95027c --- /dev/null +++ b/core-aam/aamtests/role/comment.py @@ -0,0 +1,34 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-comment + +TEST_HTML = "" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_COMMENT + # Object Attribute: xml-roles:comment + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.COMMENT + assert "xml-roles:comment" in atspi.Accessible.get_attributes_as_array(node) + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXGroup + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: IA2_ROLE_COMMENT +# # Object Attribute: xml-roles:comment + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Group +# # Localized Control Type: comment diff --git a/core-aam/aamtests/role/dialog.py b/core-aam/aamtests/role/dialog.py new file mode 100644 index 00000000000000..45570e31f83cd9 --- /dev/null +++ b/core-aam/aamtests/role/dialog.py @@ -0,0 +1,31 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-dialog + +TEST_HTML = "" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_DIALOG + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.DIALOG + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXGroup +# # AXSubrole: AXApplicationDialog + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_DIALOG + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Pane diff --git a/core-aam/aamtests/role/form.py b/core-aam/aamtests/role/form.py new file mode 100644 index 00000000000000..3bdaf20445ec0c --- /dev/null +++ b/core-aam/aamtests/role/form.py @@ -0,0 +1,36 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-form + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_LANDMARK + # Object Attribute: xml-roles:form + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.LANDMARK + assert "xml-roles:form" in atspi.Accessible.get_attributes_as_array(node) + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXGroup +# # AXSubrole: AXLandmarkForm + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: IA2_ROLE_FORM +# # Object Attribute: xml-roles:form + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Group +# # Localized Control Type: form +# # Landmark Type: Form diff --git a/core-aam/aamtests/role/grid.py b/core-aam/aamtests/role/grid.py new file mode 100644 index 00000000000000..cca58932bc1846 --- /dev/null +++ b/core-aam/aamtests/role/grid.py @@ -0,0 +1,48 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-grid + +TEST_HTML = "
content
content
content
content
content
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_TABLE + # Object Attribute: xml-roles:grid + # Interface: Table + # Interface: Selection + # Because WAI-ARIA does not support modifying the selection via the accessibility API, user agents MUST return false for all Selection methods that provide a means to modify the selection. + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.TABLE + assert "xml-roles:grid" in atspi.Accessible.get_attributes_as_array(node) + assert atspi.Accessible.get_table_iface(node) is not None + assert atspi.Accessible.get_selection_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXTable +# # AXSubrole: +# # AXColumnHeaderUIElements: a list of pointers to the columnheader elements +# # AXHeader: a pointer to the row or group containing those columnheader elements +# # AXRowHeaderUIElements: a list of pointers to the rowheader elements + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_TABLE +# # Object Attribute: xml-roles:grid +# # Interface: IAccessibleTable2 +# # Method: IAccessible::accSelect() +# # Method: IAccessible::get_accSelection() + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: DataGrid +# # Control Pattern: Grid +# # Control Pattern: Table +# # Control Pattern: Selection diff --git a/core-aam/aamtests/role/gridcell.py b/core-aam/aamtests/role/gridcell.py new file mode 100644 index 00000000000000..4a9f18751aae81 --- /dev/null +++ b/core-aam/aamtests/role/gridcell.py @@ -0,0 +1,39 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-gridcell + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_TABLE_CELL + # Interface: TableCell + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.TABLE_CELL + assert atspi.Accessible.get_table_cell(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXCell +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_CELL +# # Interface: IAccessibleTableCell + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: DataItem +# # Localized Control Type: item +# # Control Pattern: SelectionItem +# # Control Pattern: GridItem +# # Control Pattern: TableItem +# # SelectionItem.SelectionContainer: grid diff --git a/core-aam/aamtests/role/image.py b/core-aam/aamtests/role/image.py new file mode 100644 index 00000000000000..a6cbb53fa3c169 --- /dev/null +++ b/core-aam/aamtests/role/image.py @@ -0,0 +1,34 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-image + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_IMAGE + # Interface: Image + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.IMAGE + assert atspi.Accessible.get_image_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXImage +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_GRAPHIC +# # Interface: IAccessibleImage + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Image diff --git a/core-aam/aamtests/role/img.py b/core-aam/aamtests/role/img.py new file mode 100644 index 00000000000000..9a08118490e14e --- /dev/null +++ b/core-aam/aamtests/role/img.py @@ -0,0 +1,34 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-img + +TEST_HTML = "" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_IMAGE + # Interface: Image + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.IMAGE + assert atspi.Accessible.get_image_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXImage +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_GRAPHIC +# # Interface: IAccessibleImage + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Image diff --git a/core-aam/aamtests/role/link.py b/core-aam/aamtests/role/link.py index eb086b76a6ae36..0d37d6eb8487fb 100644 --- a/core-aam/aamtests/role/link.py +++ b/core-aam/aamtests/role/link.py @@ -55,4 +55,12 @@ def test_ia2(ia2, session, inline, test_html): if "aria-disabled=true" in test_html: assert "FOCUSABLE" not in msaa_state - assert ia2.get_hyperlink_interface(node) is not None \ No newline at end of file + assert ia2.get_hyperlink_interface(node) is not None + +# @pytest.mark.parametrize("test_html", TEST_HTML.values(), ids=TEST_HTML.keys()) +# def test_uia(uia, session, inline, test_html): +# session.url = inline(test_html) +# +# # Spec: +# # Control Type: HyperLink +# # Control Pattern: Value diff --git a/core-aam/aamtests/role/listbox.py b/core-aam/aamtests/role/listbox.py new file mode 100644 index 00000000000000..66a1a012d9dd63 --- /dev/null +++ b/core-aam/aamtests/role/listbox.py @@ -0,0 +1,37 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-listbox + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_LIST_BOX + # Interface: Selection + # Because WAI-ARIA does not support modifying the selection via the accessibility API, user agents MUST return false for all Selection methods that provide a means to modify the selection. + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.LIST_BOX + assert atspi.Accessible.get_selection_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXList +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_LIST +# # Method: IAccessible::accSelect() +# # Method: IAccessible::get_accSelection() + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: List +# # Control Pattern: Selection diff --git a/core-aam/aamtests/role/listbox_in_combobox.py b/core-aam/aamtests/role/listbox_in_combobox.py new file mode 100644 index 00000000000000..6ce8c2f3a65724 --- /dev/null +++ b/core-aam/aamtests/role/listbox_in_combobox.py @@ -0,0 +1,37 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-listbox-in-combobox + +TEST_HTML = "
content
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_MENU + # Interface: Selection + # Because WAI-ARIA does not support modifying the selection via the accessibility API, user agents MUST return false for all Selection methods that provide a means to modify the selection. + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.MENU + assert atspi.Accessible.get_selection_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXList +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_LIST +# # Method: IAccessible::accSelect() +# # Method: IAccessible::get_accSelection() + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: List +# # Control Pattern: Selection diff --git a/core-aam/aamtests/role/log.py b/core-aam/aamtests/role/log.py new file mode 100644 index 00000000000000..29259ef45e6b2a --- /dev/null +++ b/core-aam/aamtests/role/log.py @@ -0,0 +1,44 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-log + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_LOG + # Object Attribute: xml-roles:log + # Object Attribute: container-live:polite + # Object Attribute: live:polite + # Object Attribute: container-live-role:log + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.LOG + assert "xml-roles:log" in atspi.Accessible.get_attributes_as_array(node) + assert "container-live:polite" in atspi.Accessible.get_attributes_as_array(node) + assert "live:polite" in atspi.Accessible.get_attributes_as_array(node) + assert "container-live-role:log" in atspi.Accessible.get_attributes_as_array(node) + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXGroup +# # AXSubrole: AXApplicationLog + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Object Attribute: xml-roles:log +# # Object Attribute: container-live:polite +# # Object Attribute: live:polite +# # Object Attribute: container-live-role:log + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Group +# # Localized Control Type: log +# # LiveSetting: Polite (1) diff --git a/core-aam/aamtests/role/mark.py b/core-aam/aamtests/role/mark.py new file mode 100644 index 00000000000000..fd46d5a18ffd99 --- /dev/null +++ b/core-aam/aamtests/role/mark.py @@ -0,0 +1,36 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-mark + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_MARK + # Object Attribute: xml-roles:mark + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.MARK + assert "xml-roles:mark" in atspi.Accessible.get_attributes_as_array(node) + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXGroup +# # AXRoleDescription: highlight +# # AXAttributedStringForTextMarkerRange: AXHighlight = 1;: for all text contained in a mark + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_GROUPING +# # Role: IA2_ROLE_MARK +# # Object Attribute: xml-roles:mark + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Group diff --git a/core-aam/aamtests/role/math-role.py b/core-aam/aamtests/role/math-role.py new file mode 100644 index 00000000000000..ee5df17752a61a --- /dev/null +++ b/core-aam/aamtests/role/math-role.py @@ -0,0 +1,32 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-math + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_MATH + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.MATH + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXGroup +# # AXSubrole: AXDocumentMath + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_EQUATION + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Group +# # Localized Control Type: math diff --git a/core-aam/aamtests/role/menu.py b/core-aam/aamtests/role/menu.py new file mode 100644 index 00000000000000..29bea78322ca01 --- /dev/null +++ b/core-aam/aamtests/role/menu.py @@ -0,0 +1,36 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-menu + +TEST_HTML = "" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_MENU + # Interface: Selection + # Because WAI-ARIA does not support modifying the selection via the accessibility API, user agents MUST return false for all Selection methods that provide a means to modify the selection. + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.MENU + assert atspi.Accessible.get_selection_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXMenu +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_MENUPOPUP +# # Method: IAccessible::accSelect() +# # Method: IAccessible::get_accSelection() + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Menu diff --git a/core-aam/aamtests/role/menubar.py b/core-aam/aamtests/role/menubar.py new file mode 100644 index 00000000000000..77867ba07bfef0 --- /dev/null +++ b/core-aam/aamtests/role/menubar.py @@ -0,0 +1,36 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-menubar + +TEST_HTML = "" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_MENU_BAR + # Interface: Selection + # Because WAI-ARIA does not support modifying the selection via the accessibility API, user agents MUST return false for all Selection methods that provide a means to modify the selection. + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.MENU_BAR + assert atspi.Accessible.get_selection_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXMenuBar +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_MENUBAR +# # Method: IAccessible::accSelect() +# # Method: IAccessible::get_accSelection() + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: MenuBar diff --git a/core-aam/aamtests/role/meter.py b/core-aam/aamtests/role/meter.py new file mode 100644 index 00000000000000..e7d2e675a27c2b --- /dev/null +++ b/core-aam/aamtests/role/meter.py @@ -0,0 +1,36 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-meter + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_LEVEL_BAR + # Interface: Value + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.LEVEL_BAR + assert atspi.Accessible.get_value_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXLevelIndicator +# # AXSubrole: AXMeter + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: IA2_ROLE_LEVEL_BAR +# # Interface: IAccessibleValue + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: ProgressBar +# # Localized Control Type: meter +# # Control Pattern: RangeValue diff --git a/core-aam/aamtests/role/option_in_combobox.py b/core-aam/aamtests/role/option_in_combobox.py new file mode 100644 index 00000000000000..7f200f70279822 --- /dev/null +++ b/core-aam/aamtests/role/option_in_combobox.py @@ -0,0 +1,35 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-option-in-combobox + +TEST_HTML = "
content
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_MENU_ITEM + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.MENU_ITEM + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXStaticText +# # AXSubrole: +# # See also: aria-checked in the State and Property Mapping Tables + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_LISTITEM +# # See also: aria-checked in the State and Property Mapping Tables + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: ListItem +# # Control Pattern: Invoke +# # See also: aria-checked in the State and Property Mapping Tables diff --git a/core-aam/aamtests/role/progressbar.py b/core-aam/aamtests/role/progressbar.py new file mode 100644 index 00000000000000..0fb6be3801403a --- /dev/null +++ b/core-aam/aamtests/role/progressbar.py @@ -0,0 +1,36 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-progressbar + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_PROGRESS_BAR + # Interface: Value + # Because WAI-ARIA does not support modifying the value via the accessibility API, user agents MUST return false for all Value methods that provide a means to modify the value. + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.PROGRESS_BAR + assert atspi.Accessible.get_value_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXProgressIndicator +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_PROGRESSBAR +# # State: STATE_SYSTEM_READONLY +# # Interface: IAccessibleValue + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: ProgressBar
Control Pattern: RangeValue if aria-valuenow, aria-valuemax, or aria-valuemin is present diff --git a/core-aam/aamtests/role/rowgroup.py b/core-aam/aamtests/role/rowgroup.py new file mode 100644 index 00000000000000..37667c9410d7f9 --- /dev/null +++ b/core-aam/aamtests/role/rowgroup.py @@ -0,0 +1,30 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-rowgroup + +TEST_HTML = "
content
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_PANEL + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.PANEL + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Not mapped + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_GROUPING + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Group diff --git a/core-aam/aamtests/role/rowheader.py b/core-aam/aamtests/role/rowheader.py new file mode 100644 index 00000000000000..20264024d8ccca --- /dev/null +++ b/core-aam/aamtests/role/rowheader.py @@ -0,0 +1,34 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-rowheader + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_ROW_HEADER + # Interface: TableCell + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.ROW_HEADER + assert atspi.Accessible.get_table_cell(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXCell +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_ROWHEADER +# # Interface: IAccessibleTableCell + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: HeaderItem diff --git a/core-aam/aamtests/role/scrollbar.py b/core-aam/aamtests/role/scrollbar.py new file mode 100644 index 00000000000000..8317bf60856004 --- /dev/null +++ b/core-aam/aamtests/role/scrollbar.py @@ -0,0 +1,36 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-scrollbar + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_SCROLL_BAR + # Interface: Value + # Because WAI-ARIA does not support modifying the value via the accessibility API, user agents MUST return false for all Value methods that provide a means to modify the value. + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.SCROLL_BAR + assert atspi.Accessible.get_value_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXScrollBar +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_SCROLLBAR +# # Interface: IAccessibleValue + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: ScrollBar +# # Control Pattern: RangeValue diff --git a/core-aam/aamtests/role/searchbox.py b/core-aam/aamtests/role/searchbox.py new file mode 100644 index 00000000000000..dc18ba3f8c1435 --- /dev/null +++ b/core-aam/aamtests/role/searchbox.py @@ -0,0 +1,39 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-searchbox + +TEST_HTML = "" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_ENTRY + # Object Attribute: xml-roles:searchbox + # Object Attribute: text-input-type:search + # Interface: EditableText: if aria-readonly is not "true" + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.ENTRY + assert "xml-roles:searchbox" in atspi.Accessible.get_attributes_as_array(node) + assert "text-input-type:search" in atspi.Accessible.get_attributes_as_array(node) + assert atspi.Accessible.get_editable_text_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXTextField +# # AXSubrole: AXSearchField + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_TEXT +# # Object Attribute: text-input-type:search + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Edit +# # Localized Control Type: search box diff --git a/core-aam/aamtests/role/separator_focusable.py b/core-aam/aamtests/role/separator_focusable.py new file mode 100644 index 00000000000000..3f3b14eb28aa01 --- /dev/null +++ b/core-aam/aamtests/role/separator_focusable.py @@ -0,0 +1,36 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-separator-focusable + +TEST_HTML = "" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_SEPARATOR + # Interface: Value + # Because WAI-ARIA does not support modifying the value via the accessibility API, user agents MUST return false for all Value methods that provide a means to modify the value. + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.SEPARATOR + assert atspi.Accessible.get_value_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXSplitter +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_SEPARATOR +# # Interface: IAccessibleValue + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Thumb +# # Control Pattern: RangeValue diff --git a/core-aam/aamtests/role/slider.py b/core-aam/aamtests/role/slider.py new file mode 100644 index 00000000000000..ec77c17d3adb79 --- /dev/null +++ b/core-aam/aamtests/role/slider.py @@ -0,0 +1,36 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-slider + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_SLIDER + # Interface: Value + # Because WAI-ARIA does not support modifying the value via the accessibility API, user agents MUST return false for all Value methods that provide a means to modify the value. + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.SLIDER + assert atspi.Accessible.get_value_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXSlider +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_SLIDER +# # Interface: IAccessibleValue + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Slider +# # Control Pattern: RangeValue diff --git a/core-aam/aamtests/role/spinbutton.py b/core-aam/aamtests/role/spinbutton.py new file mode 100644 index 00000000000000..3edf0667f330d1 --- /dev/null +++ b/core-aam/aamtests/role/spinbutton.py @@ -0,0 +1,36 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-spinbutton + +TEST_HTML = "
10
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_SPIN_BUTTON + # Interface: Value + # Because WAI-ARIA does not support modifying the value via the accessibility API, user agents MUST return false for all Value methods that provide a means to modify the value. + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.SPIN_BUTTON + assert atspi.Accessible.get_value_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXIncrementor +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_SPINBUTTON +# # Interface: IAccessibleValue + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Spinner +# # Control Pattern: RangeValue diff --git a/core-aam/aamtests/role/status.py b/core-aam/aamtests/role/status.py new file mode 100644 index 00000000000000..c8f4fa2775f859 --- /dev/null +++ b/core-aam/aamtests/role/status.py @@ -0,0 +1,42 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-status + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_STATUS_BAR + # Object Attribute: container-live:polite + # Object Attribute: live:polite + # Object Attribute: container-live-role:status + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.STATUS_BAR + assert "container-live:polite" in atspi.Accessible.get_attributes_as_array(node) + assert "live:polite" in atspi.Accessible.get_attributes_as_array(node) + assert "container-live-role:status" in atspi.Accessible.get_attributes_as_array(node) + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXGroup +# # AXSubrole: AXApplicationStatus + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_STATUSBAR +# # Object Attribute: container-live:polite +# # Object Attribute: live:polite +# # Object Attribute: container-live-role:status + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Group +# # Localized Control Type: status +# # LiveSetting: Polite (1) diff --git a/core-aam/aamtests/role/suggestion.py b/core-aam/aamtests/role/suggestion.py new file mode 100644 index 00000000000000..a419c9f81c96cd --- /dev/null +++ b/core-aam/aamtests/role/suggestion.py @@ -0,0 +1,35 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-suggestion + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_SUGGESTION + # Object Attribute: xml-roles:suggestion + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.SUGGESTION + assert "xml-roles:suggestion" in atspi.Accessible.get_attributes_as_array(node) + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXGroup +# # AXAttributedStringForTextMarkerRange: AXIsSuggestion = 1;: for all text contained in a suggestion + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: IA2_ROLE_SUGGESTION +# # Object Attribute: xml-roles:suggestion + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Group +# # Localized Control Type: suggestion diff --git a/core-aam/aamtests/role/tab.py b/core-aam/aamtests/role/tab.py new file mode 100644 index 00000000000000..790c528a4909f6 --- /dev/null +++ b/core-aam/aamtests/role/tab.py @@ -0,0 +1,34 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-tab + +TEST_HTML = "
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_PAGE_TAB + # State: STATE_SELECTED: if focus is inside tabpanel associated with aria-labelledby + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.PAGE_TAB + assert "STATE_SELECTED" in atspi.get_state_list_helper(node) + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXRadioButton +# # AXSubrole: AXTabButton + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_PAGETAB +# # State: STATE_SYSTEM_SELECTED: if focus is inside tabpanel associated with aria-labelledby + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: TabItem diff --git a/core-aam/aamtests/role/table.py b/core-aam/aamtests/role/table.py new file mode 100644 index 00000000000000..427b714a48e416 --- /dev/null +++ b/core-aam/aamtests/role/table.py @@ -0,0 +1,42 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-table + +TEST_HTML = "
content
content
content
content
content
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_TABLE + # Object Attribute: xml-roles:table + # Interface: Table + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.TABLE + assert "xml-roles:table" in atspi.Accessible.get_attributes_as_array(node) + assert atspi.Accessible.get_table_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXTable +# # AXSubrole: +# # AXColumnHeaderUIElements: a list of pointers to the columnheader elements +# # AXHeader: a pointer to the row or group containing those columnheader elements +# # AXRowHeaderUIElements: a list of pointers to the rowheader elements + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_TABLE +# # Object Attribute: xml-roles:table +# # Interface: IAccessibleTable2 + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Table +# # Control Pattern: Grid +# # Control Pattern: Table diff --git a/core-aam/aamtests/role/tablist.py b/core-aam/aamtests/role/tablist.py new file mode 100644 index 00000000000000..05e0bb5d760fe3 --- /dev/null +++ b/core-aam/aamtests/role/tablist.py @@ -0,0 +1,37 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-tablist + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_PAGE_TAB_LIST + # Interface: Selection + # Because WAI-ARIA does not support modifying the selection via the accessibility API, user agents MUST return false for all Selection methods that provide a means to modify the selection. + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.PAGE_TAB_LIST + assert atspi.Accessible.get_selection_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXTabGroup +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_PAGETABLIST +# # Method: IAccessible::accSelect() +# # Method: IAccessible::get_accSelection() + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Tab +# # Control Pattern: Selection diff --git a/core-aam/aamtests/role/textbox.py b/core-aam/aamtests/role/textbox.py new file mode 100644 index 00000000000000..8894204934b2fa --- /dev/null +++ b/core-aam/aamtests/role/textbox.py @@ -0,0 +1,36 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-textbox + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_ENTRY + # State: STATE_SINGLE_LINE + # Interface: EditableText: if aria-readonly is not "true" + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.ENTRY + assert "STATE_SINGLE_LINE" in atspi.get_state_list_helper(node) + assert atspi.Accessible.get_editable_text_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXTextField +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_TEXT +# # State: IA2_STATE_SINGLE_LINE + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Edit diff --git a/core-aam/aamtests/role/textbox_multiline.py b/core-aam/aamtests/role/textbox_multiline.py new file mode 100644 index 00000000000000..a439097abb1660 --- /dev/null +++ b/core-aam/aamtests/role/textbox_multiline.py @@ -0,0 +1,36 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-textbox-multiline + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_ENTRY + # State: STATE_MULTI_LINE + # Interface: EditableText: if aria-readonly is not "true" + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.ENTRY + assert "STATE_MULTI_LINE" in atspi.get_state_list_helper(node) + assert atspi.Accessible.get_editable_text_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXTextArea +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_TEXT +# # State: IA2_STATE_MULTI_LINE + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Edit diff --git a/core-aam/aamtests/role/time-role.py b/core-aam/aamtests/role/time-role.py new file mode 100644 index 00000000000000..83a48ef2e09397 --- /dev/null +++ b/core-aam/aamtests/role/time-role.py @@ -0,0 +1,36 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-time + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_STATIC + # Object Attribute: xml-roles:time + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.STATIC + assert "xml-roles:time" in atspi.Accessible.get_attributes_as_array(node) + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXGroup +# # AXSubrole: AXTimeGroup + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_GROUPING +# # Object Attribute: xml-roles:time + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Text +# # Localized Control Type: time +# # Note: create a separate UIA Control of type Text. This is different from most UIA text mappings, which only create ranges in the page text pattern. diff --git a/core-aam/aamtests/role/tree.py b/core-aam/aamtests/role/tree.py new file mode 100644 index 00000000000000..9cf27f41a25f1c --- /dev/null +++ b/core-aam/aamtests/role/tree.py @@ -0,0 +1,36 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-tree + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_TREE + # Interface: Selection + # Because WAI-ARIA does not support modifying the selection via the accessibility API, user agents MUST return false for all Selection methods that provide a means to modify the selection. + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.TREE + assert atspi.Accessible.get_selection_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXOutline +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_OUTLINE +# # Method: IAccessible::accSelect() +# # Method: IAccessible::get_accSelection() + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: Tree diff --git a/core-aam/aamtests/role/treegrid.py b/core-aam/aamtests/role/treegrid.py new file mode 100644 index 00000000000000..510ef703b27d31 --- /dev/null +++ b/core-aam/aamtests/role/treegrid.py @@ -0,0 +1,39 @@ +# Testing: https://w3c.github.io/core-aam/#role-map-treegrid + +TEST_HTML = "
content
" + +def test_atspi(atspi, session, inline): + session.url = inline(TEST_HTML) + + # Spec: + # Role: ROLE_TREE_TABLE + # Interface: Table + # Interface: Selection + # Because WAI-ARIA does not support modifying the selection via the accessibility API, user agents MUST return false for all Selection methods that provide a means to modify the selection. + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.TREE_TABLE + assert atspi.Accessible.get_table_iface(node) is not None + assert atspi.Accessible.get_selection_iface(node) is not None + +# def test_axapi(axapi, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # AXRole: AXTable +# # AXSubrole: + +# def test_ia2(ia2, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Role: ROLE_SYSTEM_OUTLINE +# # Interface: IAccessibleTable2 +# # Method: IAccessible::accSelect() +# # Method: IAccessible::get_accSelection() + +# def test_uia(uia, session, inline): +# session.url = inline(TEST_HTML) +# +# # Spec: +# # Control Type: DataGrid From bd52d5eb35d04cc4adadfdbb55da5e3edcaa2657 Mon Sep 17 00:00:00 2001 From: Valerie Young Date: Fri, 5 Jun 2026 15:24:10 -0700 Subject: [PATCH 2/4] Remove manual tests --- core-aam/manual/alertdialog-manual.html | 76 --------- core-aam/manual/cell-manual.html | 106 ------------ core-aam/manual/code-manual.html | 93 ----------- core-aam/manual/columnheader-manual.html | 94 ----------- core-aam/manual/comment-manual.html | 88 ---------- core-aam/manual/dialog-manual.html | 76 --------- core-aam/manual/form-manual.html | 100 ----------- core-aam/manual/grid-manual.html | 157 ------------------ core-aam/manual/gridcell-manual.html | 112 ------------- core-aam/manual/image-manual.html | 90 ---------- core-aam/manual/img-manual.html | 90 ---------- core-aam/manual/link-manual.html | 108 ------------ ..._owned_by_or_child_of_combobox-manual.html | 104 ------------ ..._owned_by_or_child_of_combobox-manual.html | 107 ------------ core-aam/manual/log-manual.html | 130 --------------- core-aam/manual/mark-manual.html | 93 ----------- core-aam/manual/math-manual.html | 82 --------- core-aam/manual/menu-manual.html | 98 ----------- core-aam/manual/menubar-manual.html | 98 ----------- core-aam/manual/meter-manual.html | 100 ----------- .../manual/option_inside_combobox-manual.html | 87 ---------- core-aam/manual/progressbar-manual.html | 102 ------------ core-aam/manual/rowgroup-manual.html | 79 --------- core-aam/manual/rowheader-manual.html | 94 ----------- core-aam/manual/scrollbar-manual.html | 96 ----------- core-aam/manual/searchbox-manual.html | 102 ------------ .../manual/separator_focusable-manual.html | 96 ----------- core-aam/manual/slider-manual.html | 96 ----------- core-aam/manual/spinbutton-manual.html | 96 ----------- core-aam/manual/status-manual.html | 126 -------------- core-aam/manual/suggestion-manual.html | 87 ---------- core-aam/manual/tab-manual.html | 78 --------- core-aam/manual/table-manual.html | 145 ---------------- core-aam/manual/tablist-manual.html | 140 ---------------- ...x_when_aria-multiline_is_false-manual.html | 96 ----------- ...ox_when_aria-multiline_is_true-manual.html | 96 ----------- core-aam/manual/time-manual.html | 95 ----------- core-aam/manual/tree-manual.html | 98 ----------- core-aam/manual/treegrid-manual.html | 112 ------------- 39 files changed, 3923 deletions(-) delete mode 100644 core-aam/manual/alertdialog-manual.html delete mode 100644 core-aam/manual/cell-manual.html delete mode 100644 core-aam/manual/code-manual.html delete mode 100644 core-aam/manual/columnheader-manual.html delete mode 100644 core-aam/manual/comment-manual.html delete mode 100644 core-aam/manual/dialog-manual.html delete mode 100644 core-aam/manual/form-manual.html delete mode 100644 core-aam/manual/grid-manual.html delete mode 100644 core-aam/manual/gridcell-manual.html delete mode 100644 core-aam/manual/image-manual.html delete mode 100644 core-aam/manual/img-manual.html delete mode 100644 core-aam/manual/link-manual.html delete mode 100644 core-aam/manual/listbox_not_owned_by_or_child_of_combobox-manual.html delete mode 100644 core-aam/manual/listbox_owned_by_or_child_of_combobox-manual.html delete mode 100644 core-aam/manual/log-manual.html delete mode 100644 core-aam/manual/mark-manual.html delete mode 100644 core-aam/manual/math-manual.html delete mode 100644 core-aam/manual/menu-manual.html delete mode 100644 core-aam/manual/menubar-manual.html delete mode 100644 core-aam/manual/meter-manual.html delete mode 100644 core-aam/manual/option_inside_combobox-manual.html delete mode 100644 core-aam/manual/progressbar-manual.html delete mode 100644 core-aam/manual/rowgroup-manual.html delete mode 100644 core-aam/manual/rowheader-manual.html delete mode 100644 core-aam/manual/scrollbar-manual.html delete mode 100644 core-aam/manual/searchbox-manual.html delete mode 100644 core-aam/manual/separator_focusable-manual.html delete mode 100644 core-aam/manual/slider-manual.html delete mode 100644 core-aam/manual/spinbutton-manual.html delete mode 100644 core-aam/manual/status-manual.html delete mode 100644 core-aam/manual/suggestion-manual.html delete mode 100644 core-aam/manual/tab-manual.html delete mode 100644 core-aam/manual/table-manual.html delete mode 100644 core-aam/manual/tablist-manual.html delete mode 100644 core-aam/manual/textbox_when_aria-multiline_is_false-manual.html delete mode 100644 core-aam/manual/textbox_when_aria-multiline_is_true-manual.html delete mode 100644 core-aam/manual/time-manual.html delete mode 100644 core-aam/manual/tree-manual.html delete mode 100644 core-aam/manual/treegrid-manual.html diff --git a/core-aam/manual/alertdialog-manual.html b/core-aam/manual/alertdialog-manual.html deleted file mode 100644 index 5e72c1ccbb147b..00000000000000 --- a/core-aam/manual/alertdialog-manual.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - alertdialog - - - - - - - - -

This test examines the ARIA properties for alertdialog.

-
content
- -
-
-
- - diff --git a/core-aam/manual/cell-manual.html b/core-aam/manual/cell-manual.html deleted file mode 100644 index 3611292f799c62..00000000000000 --- a/core-aam/manual/cell-manual.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - cell - - - - - - - - -

This test examines the ARIA properties for cell.

-
-
-
content
-
-
- -
-
-
- - diff --git a/core-aam/manual/code-manual.html b/core-aam/manual/code-manual.html deleted file mode 100644 index c0bc13d5129abe..00000000000000 --- a/core-aam/manual/code-manual.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - code - - - - - - - - -

This test examines the ARIA properties for code.

-
content
-
-
-
- - diff --git a/core-aam/manual/columnheader-manual.html b/core-aam/manual/columnheader-manual.html deleted file mode 100644 index eabce27d3bce6f..00000000000000 --- a/core-aam/manual/columnheader-manual.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - columnheader - - - - - - - - -

This test examines the ARIA properties for columnheader.

-
-
-
content
-
-
- -
-
-
- - diff --git a/core-aam/manual/comment-manual.html b/core-aam/manual/comment-manual.html deleted file mode 100644 index 6c7d7a1b169c3f..00000000000000 --- a/core-aam/manual/comment-manual.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - comment - - - - - - - - -

This test examines the ARIA properties for comment.

- - -
-
-
- - diff --git a/core-aam/manual/dialog-manual.html b/core-aam/manual/dialog-manual.html deleted file mode 100644 index a93c54b07b3ba7..00000000000000 --- a/core-aam/manual/dialog-manual.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - dialog - - - - - - - - -

This test examines the ARIA properties for dialog.

- - -
-
-
- - diff --git a/core-aam/manual/form-manual.html b/core-aam/manual/form-manual.html deleted file mode 100644 index dcb6566b1bd9fe..00000000000000 --- a/core-aam/manual/form-manual.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - form - - - - - - - - -

This test examines the ARIA properties for form.

-
content
- -
-
-
- - diff --git a/core-aam/manual/grid-manual.html b/core-aam/manual/grid-manual.html deleted file mode 100644 index ed2908cc5e4796..00000000000000 --- a/core-aam/manual/grid-manual.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - grid - - - - - - - - -

This test examines the ARIA properties for grid.

-
-
-
content
-
content
-
-
-
content
-
content
-
-
-
content
-
content
-
-
- -
-
-
- - diff --git a/core-aam/manual/gridcell-manual.html b/core-aam/manual/gridcell-manual.html deleted file mode 100644 index b01d43aefcebe9..00000000000000 --- a/core-aam/manual/gridcell-manual.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - gridcell - - - - - - - - -

This test examines the ARIA properties for gridcell.

-
-
-
content
-
-
- -
-
-
- - diff --git a/core-aam/manual/image-manual.html b/core-aam/manual/image-manual.html deleted file mode 100644 index 348dbd4dd69aad..00000000000000 --- a/core-aam/manual/image-manual.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - image - - - - - - - - -

This test examines the ARIA properties for img.

-
content
- -
-
-
- - diff --git a/core-aam/manual/img-manual.html b/core-aam/manual/img-manual.html deleted file mode 100644 index 7ffdf715f7527b..00000000000000 --- a/core-aam/manual/img-manual.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - img - - - - - - - - -

This test examines the ARIA properties for img.

- - -
-
-
- - diff --git a/core-aam/manual/link-manual.html b/core-aam/manual/link-manual.html deleted file mode 100644 index 834264bb6be26c..00000000000000 --- a/core-aam/manual/link-manual.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - link - - - - - - - - -

This test examines the ARIA properties for link.

-
content
- -
-
-
- - diff --git a/core-aam/manual/listbox_not_owned_by_or_child_of_combobox-manual.html b/core-aam/manual/listbox_not_owned_by_or_child_of_combobox-manual.html deleted file mode 100644 index 791fd575c8b35a..00000000000000 --- a/core-aam/manual/listbox_not_owned_by_or_child_of_combobox-manual.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - listbox not owned by or child of combobox - - - - - - - - -

This test examines the ARIA properties for listbox not owned by or child of combobox.

-
-
content
-
- -
-
-
- - diff --git a/core-aam/manual/listbox_owned_by_or_child_of_combobox-manual.html b/core-aam/manual/listbox_owned_by_or_child_of_combobox-manual.html deleted file mode 100644 index fa5b43cb1a29ac..00000000000000 --- a/core-aam/manual/listbox_owned_by_or_child_of_combobox-manual.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - listbox owned by or child of combobox - - - - - - - - -

This test examines the ARIA properties for listbox owned by or child of combobox.

-
-
content
-
-
content
-
-
- -
-
-
- - diff --git a/core-aam/manual/log-manual.html b/core-aam/manual/log-manual.html deleted file mode 100644 index 9e3bf8b1da86e2..00000000000000 --- a/core-aam/manual/log-manual.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - log - - - - - - - - -

This test examines the ARIA properties for log.

-
content
- -
-
-
- - diff --git a/core-aam/manual/mark-manual.html b/core-aam/manual/mark-manual.html deleted file mode 100644 index c7c1909a8fb29e..00000000000000 --- a/core-aam/manual/mark-manual.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - mark - - - - - - - - -

This test examines the ARIA properties for mark.

-
content
-
-
-
- - diff --git a/core-aam/manual/math-manual.html b/core-aam/manual/math-manual.html deleted file mode 100644 index fdc6bcff1754bd..00000000000000 --- a/core-aam/manual/math-manual.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - math - - - - - - - - -

This test examines the ARIA properties for math.

-
content
- -
-
-
- - diff --git a/core-aam/manual/menu-manual.html b/core-aam/manual/menu-manual.html deleted file mode 100644 index 407bf26a2d2e41..00000000000000 --- a/core-aam/manual/menu-manual.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - menu - - - - - - - - -

This test examines the ARIA properties for menu.

- - -
-
-
- - diff --git a/core-aam/manual/menubar-manual.html b/core-aam/manual/menubar-manual.html deleted file mode 100644 index 2b8d21bcb5d60d..00000000000000 --- a/core-aam/manual/menubar-manual.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - menubar - - - - - - - - -

This test examines the ARIA properties for menubar.

- - -
-
-
- - diff --git a/core-aam/manual/meter-manual.html b/core-aam/manual/meter-manual.html deleted file mode 100644 index 74c8ba80737917..00000000000000 --- a/core-aam/manual/meter-manual.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - meter - - - - - - - - -

This test examines the ARIA properties for meter.

-
content
- -
-
-
- - diff --git a/core-aam/manual/option_inside_combobox-manual.html b/core-aam/manual/option_inside_combobox-manual.html deleted file mode 100644 index 55a38cdf6dc206..00000000000000 --- a/core-aam/manual/option_inside_combobox-manual.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - option inside combobox - - - - - - - - -

This test examines the ARIA properties for option inside combobox.

-
-
content
-
-
content
-
-
- -
-
-
- - diff --git a/core-aam/manual/progressbar-manual.html b/core-aam/manual/progressbar-manual.html deleted file mode 100644 index 8e95f370fefe46..00000000000000 --- a/core-aam/manual/progressbar-manual.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - progressbar - - - - - - - - -

This test examines the ARIA properties for progressbar.

-
content
- -
-
-
- - diff --git a/core-aam/manual/rowgroup-manual.html b/core-aam/manual/rowgroup-manual.html deleted file mode 100644 index 83efba87990615..00000000000000 --- a/core-aam/manual/rowgroup-manual.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - rowgroup - - - - - - - - -

This test examines the ARIA properties for rowgroup.

-
-
-
-
content
-
-
-
content
-
-
-
- -
-
-
- - diff --git a/core-aam/manual/rowheader-manual.html b/core-aam/manual/rowheader-manual.html deleted file mode 100644 index 64eb930a750bf5..00000000000000 --- a/core-aam/manual/rowheader-manual.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - rowheader - - - - - - - - -

This test examines the ARIA properties for rowheader.

-
-
-
content
-
-
- -
-
-
- - diff --git a/core-aam/manual/scrollbar-manual.html b/core-aam/manual/scrollbar-manual.html deleted file mode 100644 index e12c6b4a779614..00000000000000 --- a/core-aam/manual/scrollbar-manual.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - scrollbar - - - - - - - - -

This test examines the ARIA properties for scrollbar.

-
content
- -
-
-
- - diff --git a/core-aam/manual/searchbox-manual.html b/core-aam/manual/searchbox-manual.html deleted file mode 100644 index 150a6dfb842161..00000000000000 --- a/core-aam/manual/searchbox-manual.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - searchbox - - - - - - - - -

This test examines the ARIA properties for searchbox.

- - -
-
-
- - diff --git a/core-aam/manual/separator_focusable-manual.html b/core-aam/manual/separator_focusable-manual.html deleted file mode 100644 index 67bf48919dd3b6..00000000000000 --- a/core-aam/manual/separator_focusable-manual.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - separator focusable - - - - - - - - -

This test examines the ARIA properties for separator focusable.

- - -
-
-
- - diff --git a/core-aam/manual/slider-manual.html b/core-aam/manual/slider-manual.html deleted file mode 100644 index 03eb7291d32d23..00000000000000 --- a/core-aam/manual/slider-manual.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - slider - - - - - - - - -

This test examines the ARIA properties for slider.

-
content
- -
-
-
- - diff --git a/core-aam/manual/spinbutton-manual.html b/core-aam/manual/spinbutton-manual.html deleted file mode 100644 index 601367927b6dfb..00000000000000 --- a/core-aam/manual/spinbutton-manual.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - spinbutton - - - - - - - - -

This test examines the ARIA properties for spinbutton.

-
10
- -
-
-
- - diff --git a/core-aam/manual/status-manual.html b/core-aam/manual/status-manual.html deleted file mode 100644 index 9e52bba234b287..00000000000000 --- a/core-aam/manual/status-manual.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - status - - - - - - - - -

This test examines the ARIA properties for status.

-
content
- -
-
-
- - diff --git a/core-aam/manual/suggestion-manual.html b/core-aam/manual/suggestion-manual.html deleted file mode 100644 index 75ec9828925f30..00000000000000 --- a/core-aam/manual/suggestion-manual.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - suggestion - - - - - - - - -

This test examines the ARIA properties for suggestion.

-
content
-
-
-
- - diff --git a/core-aam/manual/tab-manual.html b/core-aam/manual/tab-manual.html deleted file mode 100644 index 98a1c4374a7ec4..00000000000000 --- a/core-aam/manual/tab-manual.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - tab - - - - - - - - -

This test examines the ARIA properties for tab.

-
- -
- -
-
-
- - diff --git a/core-aam/manual/table-manual.html b/core-aam/manual/table-manual.html deleted file mode 100644 index 4e924f092b794b..00000000000000 --- a/core-aam/manual/table-manual.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - table - - - - - - - - -

This test examines the ARIA properties for table.

-
-
-
content
-
content
-
-
-
content
-
content
-
-
-
content
-
content
-
-
- -
-
-
- - diff --git a/core-aam/manual/tablist-manual.html b/core-aam/manual/tablist-manual.html deleted file mode 100644 index 8aff52f2051141..00000000000000 --- a/core-aam/manual/tablist-manual.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - tablist - - - - - - - - -

This test examines the ARIA properties for tablist.

-
-
content
-
- -
-
-
- - diff --git a/core-aam/manual/textbox_when_aria-multiline_is_false-manual.html b/core-aam/manual/textbox_when_aria-multiline_is_false-manual.html deleted file mode 100644 index acc1184dbbef73..00000000000000 --- a/core-aam/manual/textbox_when_aria-multiline_is_false-manual.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - textbox when aria-multiline is false - - - - - - - - -

This test examines the ARIA properties for textbox when aria-multiline is false.

-
content
- -
-
-
- - diff --git a/core-aam/manual/textbox_when_aria-multiline_is_true-manual.html b/core-aam/manual/textbox_when_aria-multiline_is_true-manual.html deleted file mode 100644 index afd741b42baaf2..00000000000000 --- a/core-aam/manual/textbox_when_aria-multiline_is_true-manual.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - textbox when aria-multiline is true - - - - - - - - -

This test examines the ARIA properties for textbox when aria-multiline is true.

-
content
- -
-
-
- - diff --git a/core-aam/manual/time-manual.html b/core-aam/manual/time-manual.html deleted file mode 100644 index 542015953b7760..00000000000000 --- a/core-aam/manual/time-manual.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - time - - - - - - - - -

This test examines the ARIA properties for time.

-
content
-
-
-
- - diff --git a/core-aam/manual/tree-manual.html b/core-aam/manual/tree-manual.html deleted file mode 100644 index 86fb39bd00c660..00000000000000 --- a/core-aam/manual/tree-manual.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - tree - - - - - - - - -

This test examines the ARIA properties for tree.

-
-
content
-
- -
-
-
- - diff --git a/core-aam/manual/treegrid-manual.html b/core-aam/manual/treegrid-manual.html deleted file mode 100644 index 132d4048de20d3..00000000000000 --- a/core-aam/manual/treegrid-manual.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - treegrid - - - - - - - - -

This test examines the ARIA properties for treegrid.

-
-
-
content
-
-
- -
-
-
- - From 49a09d0d62eac33e33249dfc7f2fe75908ba6eef Mon Sep 17 00:00:00 2001 From: Valerie Young Date: Mon, 29 Jun 2026 16:06:47 -0700 Subject: [PATCH 3/4] Remove test of selected from tab --- core-aam/aamtests/role/tab.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core-aam/aamtests/role/tab.py b/core-aam/aamtests/role/tab.py index 790c528a4909f6..86a93c7c9cf668 100644 --- a/core-aam/aamtests/role/tab.py +++ b/core-aam/aamtests/role/tab.py @@ -7,11 +7,10 @@ def test_atspi(atspi, session, inline): # Spec: # Role: ROLE_PAGE_TAB - # State: STATE_SELECTED: if focus is inside tabpanel associated with aria-labelledby + # State: STATE_SELECTED: if focus is inside tabpanel associated with aria-labelledby (TODO: Add test) node = atspi.find_node("test", session.url) assert atspi.Accessible.get_role(node) == atspi.Role.PAGE_TAB - assert "STATE_SELECTED" in atspi.get_state_list_helper(node) # def test_axapi(axapi, session, inline): # session.url = inline(TEST_HTML) From 3de2422d884fe19b7fb379b09bc59afd83c6235c Mon Sep 17 00:00:00 2001 From: Valerie Young Date: Mon, 29 Jun 2026 16:18:49 -0700 Subject: [PATCH 4/4] Add tests of textbox with aria-readonly --- core-aam/aamtests/role/textbox.py | 19 +++++++++++++++++-- core-aam/aamtests/role/textbox_multiline.py | 17 ++++++++++++++++- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/core-aam/aamtests/role/textbox.py b/core-aam/aamtests/role/textbox.py index 8894204934b2fa..3c2861064c9bc4 100644 --- a/core-aam/aamtests/role/textbox.py +++ b/core-aam/aamtests/role/textbox.py @@ -1,8 +1,9 @@ # Testing: https://w3c.github.io/core-aam/#role-map-textbox TEST_HTML = "
content
" +TEST_HTML_READONLY = "
content
" -def test_atspi(atspi, session, inline): +def test_atspi_editable(atspi, session, inline): session.url = inline(TEST_HTML) # Spec: @@ -12,9 +13,23 @@ def test_atspi(atspi, session, inline): node = atspi.find_node("test", session.url) assert atspi.Accessible.get_role(node) == atspi.Role.ENTRY - assert "STATE_SINGLE_LINE" in atspi.get_state_list_helper(node) + #assert "STATE_SINGLE_LINE" in atspi.get_state_list_helper(node) assert atspi.Accessible.get_editable_text_iface(node) is not None + +def test_atspi_readonly(atspi, session, inline): + session.url = inline(TEST_HTML_READONLY) + + # Spec: + # Role: ROLE_ENTRY + # State: STATE_SINGLE_LINE + # Interface: EditableText: if aria-readonly is not "true" + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.ENTRY + #assert "STATE_SINGLE_LINE" in atspi.get_state_list_helper(node) + assert atspi.Accessible.get_editable_text_iface(node) is None + # def test_axapi(axapi, session, inline): # session.url = inline(TEST_HTML) # diff --git a/core-aam/aamtests/role/textbox_multiline.py b/core-aam/aamtests/role/textbox_multiline.py index a439097abb1660..fd1951b084e932 100644 --- a/core-aam/aamtests/role/textbox_multiline.py +++ b/core-aam/aamtests/role/textbox_multiline.py @@ -1,8 +1,9 @@ # Testing: https://w3c.github.io/core-aam/#role-map-textbox-multiline TEST_HTML = "
content
" +TEST_HTML_READONLY = "
content
" -def test_atspi(atspi, session, inline): +def test_atspi_editable(atspi, session, inline): session.url = inline(TEST_HTML) # Spec: @@ -15,6 +16,20 @@ def test_atspi(atspi, session, inline): assert "STATE_MULTI_LINE" in atspi.get_state_list_helper(node) assert atspi.Accessible.get_editable_text_iface(node) is not None +def test_atspi_readonly(atspi, session, inline): + session.url = inline(TEST_HTML_READONLY) + + # Spec: + # Role: ROLE_ENTRY + # State: STATE_MULTI_LINE + # Interface: EditableText: if aria-readonly is not "true" + + node = atspi.find_node("test", session.url) + assert atspi.Accessible.get_role(node) == atspi.Role.ENTRY + assert "STATE_MULTI_LINE" in atspi.get_state_list_helper(node) + assert atspi.Accessible.get_editable_text_iface(node) is None + + # def test_axapi(axapi, session, inline): # session.url = inline(TEST_HTML) #