-
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 #1442 from IBMa/dev-1336
Sync dev branch dev-1336 to dev-1304
- Loading branch information
Showing
3 changed files
with
221 additions
and
0 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
40 changes: 40 additions & 0 deletions
40
...gine/test/v2/checker/accessibility/rules/aria_semantics_role_ruleunit/body_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,40 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-US"> | ||
<head> | ||
<title>Sandbox</title> | ||
<meta charset="UTF-8" /> | ||
</head> | ||
|
||
<body aria-hidden="true"> | ||
<main> | ||
<h1>Test page</h1> | ||
</main> | ||
<script> | ||
UnitTest = { | ||
ruleIds: ["aria_attribute_allowed"], | ||
results: [ | ||
{ | ||
"ruleId": "aria_attribute_allowed", | ||
"value": [ | ||
"INFORMATION", | ||
"FAIL" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]", | ||
"aria": "/document[1]/generic[1]" | ||
}, | ||
"reasonId": "Fail_invalid_implicit_role_attr", | ||
"message": "The ARIA attributes \"aria-hidden\" are not valid for the element <body> with implicit ARIA role \"generic\"", | ||
"messageArgs": [ | ||
"aria-hidden", | ||
"body", | ||
"generic" | ||
], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
} | ||
] | ||
}; | ||
</script> | ||
</body> | ||
</html> |
175 changes: 175 additions & 0 deletions
175
...st/v2/checker/accessibility/rules/aria_semantics_role_ruleunit/search_role_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,175 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-US"> | ||
<head> | ||
<title>Sandbox</title> | ||
<meta charset="UTF-8" /> | ||
</head> | ||
|
||
<body> | ||
<main> | ||
<search> | ||
<label for=s>Site</label> | ||
<input type=search id=s> | ||
<button>Go!</button> | ||
</search> | ||
<search role="search" aria-checked="true"> </search> | ||
<search role="alert" > </search> | ||
<search role="form" aria-atomic="true"> </search> | ||
</main> | ||
<script> | ||
UnitTest = { | ||
ruleIds: ["aria_attribute_allowed", "aria_semantics_role", "aria_role_redundant"], | ||
results: [ | ||
{ | ||
"ruleId": "aria_role_redundant", | ||
"value": [ | ||
"INFORMATION", | ||
"FAIL" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/main[1]/search[2]", | ||
"aria": "/document[1]/main[1]/search[2]" | ||
}, | ||
"reasonId": "fail_redundant", | ||
"message": "The explicitly-assigned ARIA role \"search\" is redundant with the implicit role of the element <search>", | ||
"messageArgs": [ | ||
"search", | ||
"search" | ||
], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
}, | ||
{ | ||
"ruleId": "aria_semantics_role", | ||
"value": [ | ||
"INFORMATION", | ||
"PASS" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/main[1]/search[2]", | ||
"aria": "/document[1]/main[1]/search[2]" | ||
}, | ||
"reasonId": "Pass_0", | ||
"message": "Rule Passed", | ||
"messageArgs": [ | ||
"search", | ||
"search" | ||
], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
}, | ||
{ | ||
"ruleId": "aria_attribute_allowed", | ||
"value": [ | ||
"INFORMATION", | ||
"FAIL" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/main[1]/search[2]", | ||
"aria": "/document[1]/main[1]/search[2]" | ||
}, | ||
"reasonId": "Fail_invalid_role_attr", | ||
"message": "The ARIA attributes \"aria-checked\" are not valid for the element <search> with ARIA role \"search\"", | ||
"messageArgs": [ | ||
"aria-checked", | ||
"search", | ||
"search" | ||
], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
}, | ||
{ | ||
"ruleId": "aria_role_redundant", | ||
"value": [ | ||
"INFORMATION", | ||
"PASS" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/main[1]/search[3]", | ||
"aria": "/document[1]/main[1]/alert[1]" | ||
}, | ||
"reasonId": "pass", | ||
"message": "An explicitly-assigned ARIA role is not redundant with the implicit role of the element", | ||
"messageArgs": [], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
}, | ||
{ | ||
"ruleId": "aria_semantics_role", | ||
"value": [ | ||
"INFORMATION", | ||
"FAIL" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/main[1]/search[3]", | ||
"aria": "/document[1]/main[1]/alert[1]" | ||
}, | ||
"reasonId": "Fail_1", | ||
"message": "The ARIA role 'alert' is not valid for the element <search>", | ||
"messageArgs": [ | ||
"alert", | ||
"search" | ||
], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
}, | ||
{ | ||
"ruleId": "aria_role_redundant", | ||
"value": [ | ||
"INFORMATION", | ||
"PASS" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/main[1]/search[4]", | ||
"aria": "/document[1]/main[1]/form[1]" | ||
}, | ||
"reasonId": "pass", | ||
"message": "An explicitly-assigned ARIA role is not redundant with the implicit role of the element", | ||
"messageArgs": [], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
}, | ||
{ | ||
"ruleId": "aria_semantics_role", | ||
"value": [ | ||
"INFORMATION", | ||
"PASS" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/main[1]/search[4]", | ||
"aria": "/document[1]/main[1]/form[1]" | ||
}, | ||
"reasonId": "Pass_0", | ||
"message": "Rule Passed", | ||
"messageArgs": [ | ||
"form", | ||
"search" | ||
], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
}, | ||
{ | ||
"ruleId": "aria_attribute_allowed", | ||
"value": [ | ||
"INFORMATION", | ||
"PASS" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/main[1]/search[4]", | ||
"aria": "/document[1]/main[1]/form[1]" | ||
}, | ||
"reasonId": "Pass", | ||
"message": "ARIA attributes are valid for the element and ARIA role", | ||
"messageArgs": [ | ||
"aria-atomic", | ||
"search", | ||
"form" | ||
], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
} | ||
] | ||
}; | ||
</script> | ||
</body> | ||
</html> |