Is it a good practice to use both scope attribute and id attribute + headers attribute? For example, let's say I have a simple table row
<tr> <th>John</th> <td>200</td> </tr>
Up until now, I've been using with the scope attribute like so...
<tr> <th scope="row">John</th> <td>200</td> </tr>
But now, I've looked into the id attribute and the headers attribute, and am wondering whether it isn't better for accessibility + assistive technologies to do the following:
<tr> <th scope="row" id="john">John</th> <td headers="john">200</td> </tr>
Is this good? Is it redundant? Should I only use one or the other? Please share your thoughts.
https://stackoverflow.com/questions/65385950/using-th-scope-with-th-id-td-headers December 21, 2020 at 07:47AM
没有评论:
发表评论