Skip to content

empty cells converted to headers (accesibility issue) #73

@haskinsjg

Description

@haskinsjg

If you have a table with empty cells, those cells can get converted to tags for the small version of the table. This can cause pages using the script to fail Section 508 compliance checks. An example table:

<table>
	<tr>
		<td>&nbsp;</td>
		<td>
			This is some table content
		</td>
	</tr>
</table>

Running Stackable.js results in this:

<table class=" stacktable small-only"><tbody><tr class="  "><th class="st-head-row st-head-row-main" colspan="2">&nbsp;</th></tr></tbody></table>
<table class="stacktable large-only">
	<tbody><tr>
		<td>&nbsp;</td>
		<td>
			This is some table content
		</td>
	</tr>
</tbody></table>

That empty <th class="st-head-row st-head-row-main" colspan="2"> causes 508 validation errors. Perhaps the <td> could only be converted to a <th> if it's not empty? Or have an option to ignore empty <td> tags to maintain 508 compliance?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions