From 72d2ff7a078c9129cb34a5633801426b13bff4ef Mon Sep 17 00:00:00 2001 From: Roberto Orlandi <71495874+roberto-orlandi-sonarsource@users.noreply.github.com> Date: Mon, 24 Jan 2022 12:03:49 +0100 Subject: [PATCH] Update rules metadata (#205) --- .../l10n/web/rules/Web/Sonar_way_profile.json | 2 +- .../Web/TableHeaderHasIdOrScopeCheck.html | 29 +++++++++++++++++++ sonarpedia.json | 2 +- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/sonar-html-plugin/src/main/resources/org/sonar/l10n/web/rules/Web/Sonar_way_profile.json b/sonar-html-plugin/src/main/resources/org/sonar/l10n/web/rules/Web/Sonar_way_profile.json index 91b56a82a..eb3a18ada 100644 --- a/sonar-html-plugin/src/main/resources/org/sonar/l10n/web/rules/Web/Sonar_way_profile.json +++ b/sonar-html-plugin/src/main/resources/org/sonar/l10n/web/rules/Web/Sonar_way_profile.json @@ -31,4 +31,4 @@ "TableWithoutCaptionCheck", "UnsupportedTagsInHtml5Check" ] -} +} diff --git a/sonar-html-plugin/src/main/resources/org/sonar/l10n/web/rules/Web/TableHeaderHasIdOrScopeCheck.html b/sonar-html-plugin/src/main/resources/org/sonar/l10n/web/rules/Web/TableHeaderHasIdOrScopeCheck.html index 41839ec42..949b1dea5 100644 --- a/sonar-html-plugin/src/main/resources/org/sonar/l10n/web/rules/Web/TableHeaderHasIdOrScopeCheck.html +++ b/sonar-html-plugin/src/main/resources/org/sonar/l10n/web/rules/Web/TableHeaderHasIdOrScopeCheck.html @@ -84,6 +84,35 @@
This rule is not applied in case of simple tables.
+Tables are considered as such when the headers are either all in the first row, or all in the first column. The two conditions must not apply +together.
+Simple table example:
++<table border="1"> + <caption>Simple Table 1</caption> + <tr> + <th>Name</th> + <th>Surname</th> + </tr> + <tr> + <td>John</td> + <td>Doe</td> + </tr> +</table> +<table border="1"> + <caption>Simple Table 2</caption> + <tr> + <th>Name</th> + <td>John</td> + </tr> + <tr> + <th>Surname</th> + <td>Doe</td> + </tr> +</table> +