Skip to content

Commit

Permalink
test cases #1301
Browse files Browse the repository at this point in the history
  • Loading branch information
shunguoy committed Apr 24, 2023
1 parent eacf913 commit 9ba2144
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2087,7 +2087,7 @@ export class ARIADefinitions {
globalAriaAttributesValid: true
},
"summary": {
implicitRole: ["button"],
implicitRole: null,
validRoles: null,
globalAriaAttributesValid: true
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
],
"path": {
"dom": "/html[1]/body[1]/details[1]/summary[1]",
"aria": "/document[1]/generic[1]/group[1]/button[1]"
"aria": "/document[1]/generic[1]/group[1]"
},
"reasonId": "Fail_1",
"message": "Element \"summary\" should not be focusable within the subtree of an element with an 'aria-hidden' attribute with value 'true'",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
/******************************************************************************
Copyright:: 2020- IBM, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*****************************************************************************/
-->

<html lang="en" id="id-32">

<head id="id-29">
<title id="id-36">Element with aria-hidden has no focusable content</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>

<body id="id-9" aria-atomic="true">
<details aria-hidden="true">
<summary>Some button</summary>
<summary>Another button</summary>
<p>Some details</p>
</details>
<details>
<summary>Overview</summary>
<ol>
<li>Cash on hand: $500.00</li>
<li>Current invoice: $75.30</li>
<li>Due date: 5/6/19</li>
</ol>
</details>
<ul role=none>
<li role="button" ...>li element</li> <!-- allowed because ul is no longer a 'list' -->
</ul>
<script type="text/javascript">
UnitTest = {
ruleIds: ["aria_hidden_focus_misuse"],
results: [
{
"ruleId": "aria_hidden_focus_misuse",
"value": [
"INFORMATION",
"PASS"
],
"path": {
"dom": "/html[1]/body[1]/details[1]",
"aria": "/document[1]/generic[1]/group[1]"
},
"reasonId": "Pass_0",
"message": "Rule Passed",
"messageArgs": [],
"apiArgs": [],
"category": "Accessibility"
},
{
"ruleId": "aria_hidden_focus_misuse",
"value": [
"INFORMATION",
"FAIL"
],
"path": {
"dom": "/html[1]/body[1]/details[1]/summary[1]",
"aria": "/document[1]/generic[1]/group[1]"
},
"reasonId": "Fail_1",
"message": "Element \"summary\" should not be focusable within the subtree of an element with an 'aria-hidden' attribute with value 'true'",
"messageArgs": [
"summary"
],
"apiArgs": [],
"category": "Accessibility"
},
{
"ruleId": "aria_hidden_focus_misuse",
"value": [
"INFORMATION",
"PASS"
],
"path": {
"dom": "/html[1]/body[1]/details[1]/p[1]",
"aria": "/document[1]/generic[1]/group[1]/paragraph[1]"
},
"reasonId": "Pass_0",
"message": "Rule Passed",
"messageArgs": [],
"apiArgs": [],
"category": "Accessibility"
}
]
}
</script>
</body>

</html>

0 comments on commit 9ba2144

Please sign in to comment.