Skip to content

Commit

Permalink
additional test cases #1472
Browse files Browse the repository at this point in the history
  • Loading branch information
shunguoy committed Aug 19, 2023
1 parent 81d7809 commit ff2c3d9
Show file tree
Hide file tree
Showing 12 changed files with 480 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><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.
*****************************************************************************/
-->

<head>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Data table is missing one row header</title>
<style type="text/css">
#vertical-2 thead,#vertical-2 tbody, th, td{
border: 1px solid black;
}
</style>
</head>
<body>


<table id="vertical-2">
<caption>Bottom headers</caption>

<tbody>
<tr>
<td headers="header1">row 1</td>
<td headers="header2">row 1</td>
<td headers="header3">row 1</td>
</tr>
<tr>
<td headers="header1">data</td>
<td headers="header2">data</td>
<td headers="header3">data</td>
</tr>
<tr>
<td headers="header1">data</td>
<td headers="header2">data</td>
<td headers="header3">data</td>
</tr>
<tr>
<th scope="col" id='header1'>Header 1</th>
<th scope="col" id='header2'>Header 2</th>
<th scope="col" id='header3'>Header 3</th>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="4">Footer</td>
</tr>
</tfoot>
</table>
<script>
UnitTest = {
ruleIds: ["table_headers_exists"],
results: [
{
"ruleId": "table_headers_exists",
"value": [
"INFORMATION",
"FAIL"
],
"path": {
"dom": "/html[1]/body[1]/table[1]",
"aria": "/document[1]/table[1]"
},
"reasonId": "Fail_1",
"message": "Table has no headers identified",
"messageArgs": [],
"apiArgs": [],
"category": "Accessibility"
}
]
};
</script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<head>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Data table is missing one row header</title>

<style type="text/css">
#vertical-1 thead,#vertical-1 tbody, th, td, tfoot {
border: 1px solid black;
Expand All @@ -30,15 +30,15 @@
<table id="vertical-1">
<caption>Column Headers in first cells</caption>
<tr>
<th>Header 1</th>
<th scope="row">Header 1</th>
<td>data</td><td>data</td><td>data</td>
</tr>
<tr>
<th>Header 2</th>
<th scope="row">Header 2</th>
<td>data</td><td>data</td><td>data</td>
</tr>
<tr>
<th>Header 2</th>
<th scope="row">Header 2</th>
<td>data</td><td>data</td><td>data</td>
</tr>
<tfoot>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<head>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Data table is missing one row header</title>

<style type="text/css">
thead, tbody, th, td{
display:inline-block;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

<head>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Data table is missing one row header</title>
<style type="text/css">
thead, tbody, th, td{
border: 1px solid black;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,30 @@

<head>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Data table is missing one row header</title>
<title>Data table</title>
</head>
<body>
<table>
<caption>
Council budget (in £) 2018
Council budget 2018
</caption>
<thead>
<tr>
<th scope="col">Items</th>
<th scope="col">Expenditure</th>
<th scope="col">Other</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Donuts</th>
<td>3,000</td>
<td>2,000</td>
</tr>
<tr>
<th scope="row">Stationery</th>
<td>18,000</td>
<td>8,000</td>
</tr>
</tbody>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<body>
<div class="op--relationship-heatmap-field">
<table class="op--heatmap">
<caption> Complext data table with column headers in first two cells and bottom headers</caption>
<caption> Complext data table</caption>
<tbody>
<tr class="op--heatmap-row">
<th scope="col" rowspan="6" class="op--heatmap-overall-y-label">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><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.
*****************************************************************************/
-->

<head>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Data table</title>
</head>
<body>
<table>
<caption>
Council budget 2018
</caption>
<tbody>
<tr>
<td>Donuts</th>
<td>3,000</td>
<td>2,000</td>
</tr>
<tr>
<td>Stationery</th>
<td>18,000</td>
<td>8,000</td>
</tr>
<tr>
<th >Items</th>
<th >Expenditure</th>
<th >Other</th>
</tr>
</tbody>
</table>
<script>
UnitTest = {
ruleIds: ["table_headers_exists"],
results: [
{
"ruleId": "table_headers_exists",
"value": [
"INFORMATION",
"PASS"
],
"path": {
"dom": "/html[1]/body[1]/table[1]",
"aria": "/document[1]/table[1]"
},
"reasonId": "Pass_0",
"message": "Rule Passed",
"messageArgs": [],
"apiArgs": [],
"category": "Accessibility"
}
]
};
</script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><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.
*****************************************************************************/
-->

<head>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Data table</title>
</head>
<body>
<table>
<caption>
Council budget 2018
</caption>
<tbody>
<tr>
<td></th>
<td></td>
<td></td>
</tr>
<tr>
<td></th>
<td></td>
<td></td>
</tr>
<tr>
<th >Items</th>
<th >Expenditure</th>
<th >Other</th>
</tr>
<tr>
<td>Donuts</th>
<td>3,000</td>
<td>2,000</td>
</tr>
<tr>
<td>Stationery</th>
<td>18,000</td>
<td>8,000</td>
</tr>
</tbody>
</table>
<script>
UnitTest = {
ruleIds: ["table_headers_exists"],
results: [
{
"ruleId": "table_headers_exists",
"value": [
"INFORMATION",
"PASS"
],
"path": {
"dom": "/html[1]/body[1]/table[1]",
"aria": "/document[1]/table[1]"
},
"reasonId": "Pass_0",
"message": "Rule Passed",
"messageArgs": [],
"apiArgs": [],
"category": "Accessibility"
}
]
};
</script>
</body>
</html>
Loading

0 comments on commit ff2c3d9

Please sign in to comment.