-
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.
update the test case and result #842
- Loading branch information
Showing
2 changed files
with
133 additions
and
1 deletion.
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
132 changes: 132 additions & 0 deletions
132
...ngine/test/v2/checker/accessibility/rules/input_label_exists_ruleunit/input-datetime.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,132 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 5 Transitional//EN" "http://www.w3.org/TR/html5/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"> | ||
|
||
<head> | ||
<title>RPT Test Suite</title> | ||
</head> | ||
|
||
<body> | ||
|
||
<a href="#navskip">skip to main content</a> | ||
|
||
|
||
|
||
|
||
|
||
<!-- ################################################################### --> | ||
|
||
|
||
<h3>Input type Tests</h3> | ||
|
||
<!-- items at risk --> | ||
|
||
<form action="..." method="post"> | ||
<label for="f10">fs 2</label> | ||
<label for="l10">lg 2</label> | ||
<fieldset id="f10"> | ||
<legend id="l10">Legend text:datetime </legend> | ||
<label for="datetime1">DateTime field 1</label> | ||
<input type="datetime" name="datetime1" id="datetime1" value="0" title="date and time"> | ||
|
||
<label for="datetime2">DateTime field 2</label> | ||
<input type="datetime-local" name="datetime2" id="datetime2" value="0" title="date and time"> | ||
</fieldset> | ||
</form> | ||
|
||
<a name="navskip">End</a> | ||
|
||
<script> | ||
UnitTest = { | ||
ruleIds: ["label_ref_valid"], | ||
results: [ | ||
{ | ||
"ruleId": "label_ref_valid", | ||
"value": [ | ||
"INFORMATION", | ||
"PASS" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/form[1]/label[1]", | ||
"aria": "/document[1]/form[1]" | ||
}, | ||
"reasonId": "pass", | ||
"message": "The 'for' attribute for a label referencea a unique non-empty 'id' attribute of an <input> element", | ||
"messageArgs": [], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
}, | ||
{ | ||
"ruleId": "label_ref_valid", | ||
"value": [ | ||
"INFORMATION", | ||
"PASS" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/form[1]/label[2]", | ||
"aria": "/document[1]/form[1]" | ||
}, | ||
"reasonId": "pass", | ||
"message": "The 'for' attribute for a label referencea a unique non-empty 'id' attribute of an <input> element", | ||
"messageArgs": [], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
}, | ||
{ | ||
"ruleId": "label_ref_valid", | ||
"value": [ | ||
"INFORMATION", | ||
"FAIL" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/form[1]/fieldset[1]/label[1]", | ||
"aria": "/document[1]/form[1]/group[1]" | ||
}, | ||
"reasonId": "fail_invalid", | ||
"message": "The value \"datetime1\" of the 'for' attribute is not the 'id' of a valid <input> element", | ||
"messageArgs": [ | ||
"datetime1" | ||
], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
}, | ||
{ | ||
"ruleId": "label_ref_valid", | ||
"value": [ | ||
"INFORMATION", | ||
"PASS" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/form[1]/fieldset[1]/label[2]", | ||
"aria": "/document[1]/form[1]/group[1]" | ||
}, | ||
"reasonId": "pass", | ||
"message": "The 'for' attribute for a label referencea a unique non-empty 'id' attribute of an <input> element", | ||
"messageArgs": [], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
} | ||
] | ||
}; | ||
</script> | ||
</body> | ||
|
||
</html> |