Skip to content

Commit 599fa3e

Browse files
Fix semantic scope to th in table
1 parent 7cbc87a commit 599fa3e

File tree

2 files changed

+107
-42
lines changed

2 files changed

+107
-42
lines changed

src/__snapshots__/index.test.tsx.snap

+52-22
Original file line numberDiff line numberDiff line change
@@ -133,20 +133,29 @@ Array [
133133
</caption>
134134
<thead>
135135
<tr>
136-
<th>
136+
<th
137+
scope="col"
138+
>
137139
Name
138140
</th>
139-
<th>
141+
<th
142+
scope="col"
143+
>
140144
Qtd
141145
</th>
142-
<th>
146+
<th
147+
scope="col"
148+
>
143149
Price
144150
</th>
145151
</tr>
146152
</thead>
153+
147154
<tbody>
148155
<tr>
149-
<th>
156+
<th
157+
scope="row"
158+
>
150159
Kine
151160
</th>
152161
<td>
@@ -157,7 +166,9 @@ Array [
157166
</td>
158167
</tr>
159168
<tr>
160-
<th>
169+
<th
170+
scope="row"
171+
>
161172
Pigs
162173
</th>
163174
<td>
@@ -168,7 +179,9 @@ Array [
168179
</td>
169180
</tr>
170181
<tr>
171-
<th>
182+
<th
183+
scope="row"
184+
>
172185
Chickens
173186
</th>
174187
<td>
@@ -181,15 +194,17 @@ Array [
181194
</tbody>
182195
<tfoot>
183196
<tr>
184-
<th>
197+
<th
198+
scope="row"
199+
>
185200
Total
186201
</th>
187-
<th>
202+
<td>
188203
16 pcs
189-
</th>
190-
<th>
204+
</td>
205+
<td>
191206
$450
192-
</th>
207+
</td>
193208
</tr>
194209
</tfoot>
195210
</table>,
@@ -275,20 +290,29 @@ Array [
275290
</caption>
276291
<thead>
277292
<tr>
278-
<th>
293+
<th
294+
scope="col"
295+
>
279296
Name
280297
</th>
281-
<th>
298+
<th
299+
scope="col"
300+
>
282301
Qtd
283302
</th>
284-
<th>
303+
<th
304+
scope="col"
305+
>
285306
Price
286307
</th>
287308
</tr>
288309
</thead>
310+
289311
<tbody>
290312
<tr>
291-
<th>
313+
<th
314+
scope="row"
315+
>
292316
Kine
293317
</th>
294318
<td>
@@ -299,7 +323,9 @@ Array [
299323
</td>
300324
</tr>
301325
<tr>
302-
<th>
326+
<th
327+
scope="row"
328+
>
303329
Pigs
304330
</th>
305331
<td>
@@ -310,7 +336,9 @@ Array [
310336
</td>
311337
</tr>
312338
<tr>
313-
<th>
339+
<th
340+
scope="row"
341+
>
314342
Chickens
315343
</th>
316344
<td>
@@ -323,15 +351,17 @@ Array [
323351
</tbody>
324352
<tfoot>
325353
<tr>
326-
<th>
354+
<th
355+
scope="row"
356+
>
327357
Total
328358
</th>
329-
<th>
359+
<td>
330360
16 pcs
331-
</th>
332-
<th>
361+
</td>
362+
<td>
333363
$450
334-
</th>
364+
</td>
335365
</tr>
336366
</tfoot>
337367
</table>,

src/renderers/table/__snapshots__/index.test.tsx.snap

+55-20
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22

33
exports[`<Table /> when receives a simple table renders a <table> tag without <thead>, <tfoot> or <caption> 1`] = `
44
<table>
5+
56
<tbody>
67
<tr>
7-
<th>
8+
<th
9+
scope="row"
10+
>
811
Kine
912
</th>
1013
<td>
@@ -15,7 +18,9 @@ exports[`<Table /> when receives a simple table renders a <table> tag without <t
1518
</td>
1619
</tr>
1720
<tr>
18-
<th>
21+
<th
22+
scope="row"
23+
>
1924
Pigs
2025
</th>
2126
<td>
@@ -26,7 +31,9 @@ exports[`<Table /> when receives a simple table renders a <table> tag without <t
2631
</td>
2732
</tr>
2833
<tr>
29-
<th>
34+
<th
35+
scope="row"
36+
>
3037
Chickens
3138
</th>
3239
<td>
@@ -47,20 +54,29 @@ exports[`<Table /> when receives a table block renders a <table> tag 1`] = `
4754
</caption>
4855
<thead>
4956
<tr>
50-
<th>
57+
<th
58+
scope="col"
59+
>
5160
Name
5261
</th>
53-
<th>
62+
<th
63+
scope="col"
64+
>
5465
Qtd
5566
</th>
56-
<th>
67+
<th
68+
scope="col"
69+
>
5770
Price
5871
</th>
5972
</tr>
6073
</thead>
74+
6175
<tbody>
6276
<tr>
63-
<th>
77+
<th
78+
scope="row"
79+
>
6480
Kine
6581
</th>
6682
<td>
@@ -71,7 +87,9 @@ exports[`<Table /> when receives a table block renders a <table> tag 1`] = `
7187
</td>
7288
</tr>
7389
<tr>
74-
<th>
90+
<th
91+
scope="row"
92+
>
7593
Pigs
7694
</th>
7795
<td>
@@ -82,7 +100,9 @@ exports[`<Table /> when receives a table block renders a <table> tag 1`] = `
82100
</td>
83101
</tr>
84102
<tr>
85-
<th>
103+
<th
104+
scope="row"
105+
>
86106
Chickens
87107
</th>
88108
<td>
@@ -95,15 +115,17 @@ exports[`<Table /> when receives a table block renders a <table> tag 1`] = `
95115
</tbody>
96116
<tfoot>
97117
<tr>
98-
<th>
118+
<th
119+
scope="row"
120+
>
99121
Total
100122
</th>
101-
<th>
123+
<td>
102124
16 pcs
103-
</th>
104-
<th>
125+
</td>
126+
<td>
105127
$450
106-
</th>
128+
</td>
107129
</tr>
108130
</tfoot>
109131
</table>
@@ -116,20 +138,29 @@ exports[`<Table /> when receives a table block without footer renders a <table>
116138
</caption>
117139
<thead>
118140
<tr>
119-
<th>
141+
<th
142+
scope="col"
143+
>
120144
Name
121145
</th>
122-
<th>
146+
<th
147+
scope="col"
148+
>
123149
Qtd
124150
</th>
125-
<th>
151+
<th
152+
scope="col"
153+
>
126154
Price
127155
</th>
128156
</tr>
129157
</thead>
158+
130159
<tbody>
131160
<tr>
132-
<th>
161+
<th
162+
scope="row"
163+
>
133164
Kine
134165
</th>
135166
<td>
@@ -140,7 +171,9 @@ exports[`<Table /> when receives a table block without footer renders a <table>
140171
</td>
141172
</tr>
142173
<tr>
143-
<th>
174+
<th
175+
scope="row"
176+
>
144177
Pigs
145178
</th>
146179
<td>
@@ -151,7 +184,9 @@ exports[`<Table /> when receives a table block without footer renders a <table>
151184
</td>
152185
</tr>
153186
<tr>
154-
<th>
187+
<th
188+
scope="row"
189+
>
155190
Chickens
156191
</th>
157192
<td>

0 commit comments

Comments
 (0)