A compliant solution for "<table> tags should have a description" conflicts with another rule

One of the compliant solutions for https://rules.sonarsource.com/html/RSPEC-1085 is:
Adding a summary attribute.

    <table summary="New York City Marathon Results 2013"> ... </table>

However doing this results in violating Remove this deprecated “summary” attribute.

Hi @eshen and welcome to the community!

Indeed, it is a conflict that we should resolve.
Therfore I’ve created the a ticket.
Thanks for your report.


Hi @Nils_Werner, @eshen,

I’m not sure that we should remove every mention to the summary attribute. The rule already warns about the deprecation:

adding a summary attribute to the <table> tag. However note that this attribute has been deprecated in HTML5.

I would either:

  • remove the code example from compliant solutions but keep the mention of this solution above.
  • or repeat the warning in the compliant solution as it does not seem visible enough.

Developers often deal with legacy code, thus I prefer informing them of every solution with their downside rather than hide some and they have to guess if the code is accessible or not. Otherwise they can make mistakes such as adding a <caption> to a <table> which already has a summary attribute.

Does it make sense?

I didn’t see the warning about deprecation. The warning is current the same weight as the recommendation and I must have just glanced over it looking for the compliant solution section. I think repeating warning the compliant solution would help or making the warning bold so it stands out.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.