Skip to content

Extend testdriver.js and wptrunner to test AAMs (platform accessibility APIs) #53733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 133 additions & 0 deletions core-aam/attribute/aria-autocomplete.tentative.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<!doctype html>
<meta charset=utf-8>
<html>
<head>
<title>aria-braillelabel</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/core-aam/scripts/aam-utils.js"></script>
</head>
<body>

<p>
This test is marked tentative because it uses an experimental testing API
that is presently under development.
</p>

<input role='combobox' id='test1' aria-autocomplete='both'>
<input role='combobox' id='test2' aria-autocomplete='inline'>
<input role='combobox' id='test3' aria-autocomplete='list'>

<script>
AAMUtils.verifyAPI(
'aria-autocomplete=both',
'test1',
{
"Atspi" : [
[
"property",
"objectAttributes",
"contains",
"autocomplete:both"
],
[
"property",
"states",
"contains",
"STATE_SUPPORTS_AUTOCOMPLETION"
]
],
"IAccessible2" : [
[
"property",
"objectAttributes",
"contains",
"autocomplete:both"
],
[
"property",
"states",
"contains",
"IA2_STATE_SUPPORTS_AUTOCOMPLETION"
]
]
}
);

AAMUtils.verifyAPI(
'aria-autocomplete=inline',
'test2',
{
"Atspi" : [
[
"property",
"objectAttributes",
"contains",
"autocomplete:inline"
],
[
"property",
"states",
"contains",
"STATE_SUPPORTS_AUTOCOMPLETION"
]
],
"IAccessible2" : [
[
"property",
"objectAttributes",
"contains",
"autocomplete:inline"
],
[
"property",
"states",
"contains",
"IA2_STATE_SUPPORTS_AUTOCOMPLETION"
]
]
}
);

AAMUtils.verifyAPI(
'aria-autocomplete=list',
'test3',
{
"Atspi" : [
[
"property",
"objectAttributes",
"contains",
"autocomplete:list"
],
[
"property",
"states",
"contains",
"STATE_SUPPORTS_AUTOCOMPLETION"
]
],
"IAccessible2" : [
[
"property",
"objectAttributes",
"contains",
"autocomplete:list"
],
[
"property",
"states",
"contains",
"IA2_STATE_SUPPORTS_AUTOCOMPLETION"
]
]
}
);

</script>

</body>
</html>
64 changes: 64 additions & 0 deletions core-aam/attribute/aria-braillelabel.tentative.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!doctype html>
<meta charset=utf-8>
<html>
<head>
<title>aria-braillelabel</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/core-aam/scripts/aam-utils.js"></script>
</head>
<body>

<p>
This test is marked tentative because it uses an experimental testing API
that is presently under development.
</p>

<button id=test aria-braillelabel=foobar>

<script>
AAMUtils.verifyAPI(
'aria-braillelabel',
'test',
{
"Atspi" : [
[
"property",
"objectAttributes",
"contains",
"braillelabel:foobar"
]
],
"AXAPI" : [
[
"property",
"AXBrailleLabel",
"is",
"foobar"
]
],
"IAccessible2" : [
[
"property",
"objectAttributes",
"contains",
"braillelabel:foobar"
]
],
"UIA" : [
[
"property",
"AriaProperties.braillelabel",
"is",
"foobar"
]
]
},
);
</script>

</body>
</html>
78 changes: 78 additions & 0 deletions core-aam/attribute/aria-errormessage.tentative.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<!doctype html>
<meta charset=utf-8>
<html>
<head>
<title>aria-flowto</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/core-aam/scripts/aam-utils.js"></script>
</head>
<body>

<p>
This test is marked tentative because it uses an experimental testing API
that is presently under development.
</p>

<div role='checkbox' id='test' aria-errormessage='error1 error2' aria-invalid='true'>content</div>
<div id='error1'>hello</div>
<div id='error2'>world</div>

<script>
AAMUtils.verifyAPI(
'aria-flowto',
'test',
{
"Atspi" : [
[
"relation",
"RELATION_ERROR_MESSAGE",
"is",
['error1', 'error2']
],
[
"reverseRelation",
"RELATION_ERROR_FOR",
"is",
['error1', 'error2']
]
],
"AXAPI" : [
[
"property",
"AXErrorMessageElements",
"is",
['error1', 'error2']
]
],
"IAccessible2" : [
[
"relation",
"IA2_RELATION_ERROR",
"is",
['error1', 'error2']
],
[
"reverseRelation",
"IA2_RELATION_ERROR_FOR",
"is",
['error1', 'error2']
]
],
"UIA" : [
[
"property",
"ControllerFor",
"is",
['error1', 'error2']
]
]
}
);
</script>

</body>
</html>
82 changes: 82 additions & 0 deletions core-aam/role/blockquote.tentative.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<!doctype html>
<meta charset=utf-8>
<html>
<head>
<title>role blockquote</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/core-aam/scripts/aam-utils.js"></script>
</head>
<body>

<p>
This test is marked tentative because it uses an experimental testing API
that is presently under development.
</p>

<div id=test role=blockquote>quote</div>

<script>
AAMUtils.verifyAPI(
'role=blockquote',
'test',
{
"Atspi" : [
[
"property",
"role",
"is",
"block quote"
]
],
"AXAPI" : [
[
"property",
"AXRole",
"is",
"AXGroup"
],
[
"property",
"AXSubrole",
"is",
"<nil>"
]
],
"IAccessible2" : [
[
"property",
"role",
"is",
"IA2_ROLE_BLOCK_QUOTE"
],
[
"property",
"msaaRole",
"is",
"ROLE_SYSTEM_GROUPING"
]
],
"UIA" : [
[
"property",
"ControlType",
"is",
"Group"
],
[
"property",
"LocalizedControlType",
"is",
"blockquote"
]
]
}
);
</script>

</body>
</html>
Loading
Loading