https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/table/table.html
I am following the example provided by W3C for creating an accessible DIV table. I've added the appropriate role tags and attributes.
Will wrapping some of the cells in a div, break the accessibility of the table?
For example: Note where the div
with "testClass" is placed.
<div role="table"
aria-label="Students"
aria-describedby="students_table_desc">
<div id="students_table_desc">
Students currently enrolled in WAI-ARIA 101 for the coming semester
</div>
<div role="rowgroup">
<div role="row">
<span role="columnheader">
First Name
</span>
<span role="columnheader">
Last Name
</span>
<span role="columnheader">
Company
</span>
<span role="columnheader">
Address
</span>
</div>
</div>
<div role="rowgroup">
<div role="row">
<span role="cell">
Fred
</span>
<div class="testClass">
<span role="cell">
Jackson
</span>
<span role="cell">
Acme, Inc.
</span>
</div>
<span role="cell">
123 Broad St.
</span>
</div>
<div role="row">
<span role="cell">
Sara
</span>
<span role="cell">
James
</span>
<span role="cell">
Acme, Inc.
</span>
<span role="cell">
123 Broad St.
</span>
</div>
</div>