-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1802 from IBMa/dev-1518
fix(engine): Update ARIA definition for the ARIA in HTML changes
- Loading branch information
Showing
4 changed files
with
203 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
...test/v2/checker/accessibility/rules/aria_attribute_valid_ruleunit/deletion_attribute.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<!DOCTYPE html> | ||
<!-- | ||
/****************************************************************************** | ||
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> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | ||
<title>element role deletion</title> | ||
</head> | ||
<body> | ||
|
||
<p><s aria-label="delet">There will be 15 tickets available at the box office tonight.</s></p> | ||
<p><s role='alert' aria-label="delet">Tickets are sold out quickly, buy soon.</s></p> | ||
|
||
<p>Please Check Later!</p> | ||
|
||
<script> | ||
UnitTest = { | ||
ruleIds: ["aria_attribute_valid"], | ||
results: [ | ||
{ | ||
"ruleId": "aria_attribute_valid", | ||
"value": [ | ||
"INFORMATION", | ||
"FAIL" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/p[1]/s[1]", | ||
"aria": "/document[1]/paragraph[1]/deletion[1]" | ||
}, | ||
"reasonId": "Fail_invalid_implicit_role_attr", | ||
"message": "The ARIA attributes \"aria-label\" are not valid for the element <s> with implicit ARIA role \"deletion\"", | ||
"messageArgs": [ | ||
"aria-label", | ||
"s", | ||
"deletion" | ||
], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
}, | ||
{ | ||
"ruleId": "aria_attribute_valid", | ||
"value": [ | ||
"INFORMATION", | ||
"FAIL" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/p[2]/s[1]", | ||
"aria": "/document[1]/paragraph[2]/alert[1]" | ||
}, | ||
"reasonId": "Fail_invalid_role_attr", | ||
"message": "The ARIA attributes \"aria-label\" are not valid for the element <s> with ARIA role \"alert\"", | ||
"messageArgs": [ | ||
"aria-label", | ||
"s", | ||
"alert" | ||
], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
} | ||
] | ||
} | ||
</script> | ||
</body> | ||
</html> |
62 changes: 62 additions & 0 deletions
62
...ker-engine/test/v2/checker/accessibility/rules/aria_role_allowed_ruleunit/aside_role.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<!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">Test aside aria role allowance</title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | ||
</head> | ||
|
||
<body id="id-9" aria-atomic="true"> | ||
<aside id="id-6" role='doc-glossary' aria-expanded="true"> | ||
<h4>Epcot Center</h4> | ||
<p>The Epcot Center is a theme park in Disney World, Florida.</p> | ||
</aside> | ||
|
||
<script type="text/javascript"> | ||
UnitTest = { | ||
ruleIds: ["aria_role_valid", "aria-attribute_valid"], | ||
results: [ | ||
{ | ||
"ruleId": "aria_role_valid", | ||
"value": [ | ||
"INFORMATION", | ||
"PASS" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/aside[1]", | ||
"aria": "/document[1]/generic[1]/doc-glossary[1]" | ||
}, | ||
"reasonId": "Pass_0", | ||
"message": "Rule Passed", | ||
"messageArgs": [ | ||
"doc-glossary", | ||
"aside" | ||
], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
} | ||
] | ||
} | ||
</script> | ||
|
||
</body> | ||
|
||
</html> |
58 changes: 58 additions & 0 deletions
58
...ngine/test/v2/checker/accessibility/rules/aria_role_redundant_ruleunit/deletion_role.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<!DOCTYPE html> | ||
<!-- | ||
/****************************************************************************** | ||
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> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | ||
<title>element role deletion</title> | ||
</head> | ||
<body> | ||
|
||
<p><s role="deletion">There will be 15 tickets available at the box office tonight.</s></p> | ||
|
||
<p>Please Check Later!</p> | ||
|
||
<script> | ||
UnitTest = { | ||
ruleIds: ["aria_role_redundant"], | ||
results: [ | ||
{ | ||
"ruleId": "aria_role_redundant", | ||
"value": [ | ||
"INFORMATION", | ||
"FAIL" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/p[1]/s[1]", | ||
"aria": "/document[1]/paragraph[1]/deletion[1]" | ||
}, | ||
"reasonId": "fail_redundant", | ||
"message": "The explicitly-assigned ARIA role \"deletion\" is redundant with the implicit role of the element <s>", | ||
"messageArgs": [ | ||
"deletion", | ||
"s" | ||
], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
} | ||
] | ||
} | ||
</script> | ||
</body> | ||
</html> |