Skip to content

Commit

Permalink
Fix semantic scope to th in table
Browse files Browse the repository at this point in the history
  • Loading branch information
lightningspirit committed Oct 27, 2021
1 parent 7cbc87a commit 599fa3e
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 42 deletions.
74 changes: 52 additions & 22 deletions src/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -133,20 +133,29 @@ Array [
</caption>
<thead>
<tr>
<th>
<th
scope="col"
>
Name
</th>
<th>
<th
scope="col"
>
Qtd
</th>
<th>
<th
scope="col"
>
Price
</th>
</tr>
</thead>
<tbody>
<tr>
<th>
<th
scope="row"
>
Kine
</th>
<td>
Expand All @@ -157,7 +166,9 @@ Array [
</td>
</tr>
<tr>
<th>
<th
scope="row"
>
Pigs
</th>
<td>
Expand All @@ -168,7 +179,9 @@ Array [
</td>
</tr>
<tr>
<th>
<th
scope="row"
>
Chickens
</th>
<td>
Expand All @@ -181,15 +194,17 @@ Array [
</tbody>
<tfoot>
<tr>
<th>
<th
scope="row"
>
Total
</th>
<th>
<td>
16 pcs
</th>
<th>
</td>
<td>
$450
</th>
</td>
</tr>
</tfoot>
</table>,
Expand Down Expand Up @@ -275,20 +290,29 @@ Array [
</caption>
<thead>
<tr>
<th>
<th
scope="col"
>
Name
</th>
<th>
<th
scope="col"
>
Qtd
</th>
<th>
<th
scope="col"
>
Price
</th>
</tr>
</thead>
<tbody>
<tr>
<th>
<th
scope="row"
>
Kine
</th>
<td>
Expand All @@ -299,7 +323,9 @@ Array [
</td>
</tr>
<tr>
<th>
<th
scope="row"
>
Pigs
</th>
<td>
Expand All @@ -310,7 +336,9 @@ Array [
</td>
</tr>
<tr>
<th>
<th
scope="row"
>
Chickens
</th>
<td>
Expand All @@ -323,15 +351,17 @@ Array [
</tbody>
<tfoot>
<tr>
<th>
<th
scope="row"
>
Total
</th>
<th>
<td>
16 pcs
</th>
<th>
</td>
<td>
$450
</th>
</td>
</tr>
</tfoot>
</table>,
Expand Down
75 changes: 55 additions & 20 deletions src/renderers/table/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

exports[`<Table /> when receives a simple table renders a <table> tag without <thead>, <tfoot> or <caption> 1`] = `
<table>
<tbody>
<tr>
<th>
<th
scope="row"
>
Kine
</th>
<td>
Expand All @@ -15,7 +18,9 @@ exports[`<Table /> when receives a simple table renders a <table> tag without <t
</td>
</tr>
<tr>
<th>
<th
scope="row"
>
Pigs
</th>
<td>
Expand All @@ -26,7 +31,9 @@ exports[`<Table /> when receives a simple table renders a <table> tag without <t
</td>
</tr>
<tr>
<th>
<th
scope="row"
>
Chickens
</th>
<td>
Expand All @@ -47,20 +54,29 @@ exports[`<Table /> when receives a table block renders a <table> tag 1`] = `
</caption>
<thead>
<tr>
<th>
<th
scope="col"
>
Name
</th>
<th>
<th
scope="col"
>
Qtd
</th>
<th>
<th
scope="col"
>
Price
</th>
</tr>
</thead>
<tbody>
<tr>
<th>
<th
scope="row"
>
Kine
</th>
<td>
Expand All @@ -71,7 +87,9 @@ exports[`<Table /> when receives a table block renders a <table> tag 1`] = `
</td>
</tr>
<tr>
<th>
<th
scope="row"
>
Pigs
</th>
<td>
Expand All @@ -82,7 +100,9 @@ exports[`<Table /> when receives a table block renders a <table> tag 1`] = `
</td>
</tr>
<tr>
<th>
<th
scope="row"
>
Chickens
</th>
<td>
Expand All @@ -95,15 +115,17 @@ exports[`<Table /> when receives a table block renders a <table> tag 1`] = `
</tbody>
<tfoot>
<tr>
<th>
<th
scope="row"
>
Total
</th>
<th>
<td>
16 pcs
</th>
<th>
</td>
<td>
$450
</th>
</td>
</tr>
</tfoot>
</table>
Expand All @@ -116,20 +138,29 @@ exports[`<Table /> when receives a table block without footer renders a <table>
</caption>
<thead>
<tr>
<th>
<th
scope="col"
>
Name
</th>
<th>
<th
scope="col"
>
Qtd
</th>
<th>
<th
scope="col"
>
Price
</th>
</tr>
</thead>
<tbody>
<tr>
<th>
<th
scope="row"
>
Kine
</th>
<td>
Expand All @@ -140,7 +171,9 @@ exports[`<Table /> when receives a table block without footer renders a <table>
</td>
</tr>
<tr>
<th>
<th
scope="row"
>
Pigs
</th>
<td>
Expand All @@ -151,7 +184,9 @@ exports[`<Table /> when receives a table block without footer renders a <table>
</td>
</tr>
<tr>
<th>
<th
scope="row"
>
Chickens
</th>
<td>
Expand Down

0 comments on commit 599fa3e

Please sign in to comment.