rspec/rules/S5256/exceptions.adoc
github-actions[bot] b64b26b71a
Create rule S5256 (#3886)
* Add javascript to rule S5256

* [JS-3] Add Rspec

---------

Co-authored-by: zglicz <zglicz@users.noreply.github.com>
Co-authored-by: Michal Zgliczynski <michal.zgliczynski@sonarsource.com>
2024-04-18 11:38:03 +02:00

33 lines
686 B
Plaintext

=== Exceptions
No issue will be raised on `<table>` used for layout purpose, i.e. when it contains a `role` attribute set to `"presentation"` or `"none"`.
[source,html]
----
<table role="presentation">
<tr>
<td>Name</td>
<td>Age</td>
</tr>
<tr>
<td>John Doe</td>
<td>42</td>
</tr>
</table>
----
Note that https://www.w3schools.com/html/html_layout.asp[using <table> for layout purpose is a bad practice].
No issue will be raised on `<table>` containing an `aria-hidden` attribute set to `"true"`.
[source,html]
----
<table aria-hidden="true">
<tr>
<td>Name</td>
<td>Age</td>
</tr>
<tr>
<td>John Doe</td>
<td>42</td>
</tr>
</table>
----