-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into issue-1563
- Loading branch information
Showing
16 changed files
with
6,322 additions
and
6,583 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
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
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
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
182 changes: 182 additions & 0 deletions
182
...t/v2/checker/accessibility/rules/fieldset_label_valid_ruleunit/FieldSet-hasarialabel.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,182 @@ | ||
<!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"> | ||
|
||
<head> | ||
<title>RPT Test Suite</title> | ||
</head> | ||
|
||
<body> | ||
|
||
<a href="#navskip">skip to main content</a> | ||
|
||
|
||
<h2>Test case: FieldSet-hasarialabel.html</h2> | ||
|
||
|
||
|
||
<!-- ################################################################### --> | ||
|
||
|
||
<h3>Input type Tests</h3> | ||
|
||
<ul> | ||
<li>Test - best practice</li> | ||
</ul> | ||
<form action="..." method="post"> | ||
<fieldset aria-labelledby="mylegend"> | ||
<legend id="mylegend">Please enter your company information.</legend> | ||
|
||
<label for="cpname">Company Name</label> | ||
<input type="text" name="cpname" id="cpname" value="enter company name"> | ||
|
||
</fieldset> | ||
|
||
</form> | ||
|
||
<ul> | ||
<li>Test - no legend for fieldset but with label</li> | ||
</ul> | ||
|
||
<form action="..." method="post"> | ||
<fieldset aria-label="this is a potentially very long description of the fieldset and more description is possible"> | ||
<label for="fn1">First Name</label> | ||
<input type="text" name="firstname" id="fn1" value="enter first name" title="enter first name"> | ||
|
||
<label for="ln1">Last Name</label> | ||
<input type="text" name="lastname" id="ln1" value="enter last name" title="enter last name"> | ||
|
||
<button type="submit">Submit</button> | ||
</fieldset> | ||
</form> | ||
<ul> | ||
<li>Test - with a legend for fieldset but without label</li> | ||
</ul> | ||
<form action="..." method="post"> | ||
<fieldset> | ||
<legend id="mylegend">this is a potentially very long description of the fieldset and more description is possible</legend> | ||
|
||
<label for="name">Name</label> | ||
<input type="text" name="name" id="name" value="enter name" title="enter name"> | ||
|
||
<button type="submit">Submit</button> | ||
</fieldset> | ||
|
||
</form> | ||
|
||
<form action="..." method="post"> | ||
<fieldset aria-label="this is a potentially very long description of the fieldset and more description is possible"> | ||
<label for="fn1">First Name</label> | ||
<input type="text" name="firstname" id="fn1" value="enter first name" title="enter first name"> | ||
|
||
<label for="ln1">Last Name</label> | ||
<input type="text" name="lastname" id="ln1" value="enter last name" title="enter last name"> | ||
|
||
<button type="submit">Submit</button> | ||
</fieldset> | ||
</form> | ||
|
||
<a name="navskip"></a> | ||
|
||
|
||
<script> | ||
UnitTest = { | ||
ruleIds: ["fieldset_label_valid"], | ||
results: [ | ||
{ | ||
"ruleId": "fieldset_label_valid", | ||
"value": [ | ||
"INFORMATION", | ||
"PASS" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/form[1]/fieldset[1]", | ||
"aria": "/document[1]/form[1]/group[1]" | ||
}, | ||
"reasonId": "Pass_1", | ||
"message": "Group/Fieldset \"Please enter your company information.\" with an input has a unique name", | ||
"messageArgs": [ | ||
"Please enter your company information." | ||
], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
}, | ||
{ | ||
"ruleId": "fieldset_label_valid", | ||
"value": [ | ||
"INFORMATION", | ||
"FAIL" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/form[2]/fieldset[1]", | ||
"aria": "/document[1]/form[2]/group[1]" | ||
}, | ||
"reasonId": "Fail_2", | ||
"message": "Group/Fieldset \"this is a potentially very long description of the fieldset and more description is possible\" has a duplicate name to another group", | ||
"messageArgs": [ | ||
"this is a potentially very long description of the fieldset and more description is possible" | ||
], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
}, | ||
{ | ||
"ruleId": "fieldset_label_valid", | ||
"value": [ | ||
"INFORMATION", | ||
"FAIL" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/form[3]/fieldset[1]", | ||
"aria": "/document[1]/form[3]/group[1]" | ||
}, | ||
"reasonId": "Fail_2", | ||
"message": "Group/Fieldset \"this is a potentially very long description of the fieldset and more description is possible\" has a duplicate name to another group", | ||
"messageArgs": [ | ||
"this is a potentially very long description of the fieldset and more description is possible" | ||
], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
}, | ||
{ | ||
"ruleId": "fieldset_label_valid", | ||
"value": [ | ||
"INFORMATION", | ||
"FAIL" | ||
], | ||
"path": { | ||
"dom": "/html[1]/body[1]/form[4]/fieldset[1]", | ||
"aria": "/document[1]/form[4]/group[1]" | ||
}, | ||
"reasonId": "Fail_2", | ||
"message": "Group/Fieldset \"this is a potentially very long description of the fieldset and more description is possible\" has a duplicate name to another group", | ||
"messageArgs": [ | ||
"this is a potentially very long description of the fieldset and more description is possible" | ||
], | ||
"apiArgs": [], | ||
"category": "Accessibility" | ||
} | ||
] | ||
|
||
} | ||
</script> | ||
</body> | ||
|
||
</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
Oops, something went wrong.