Alternative fixes for "<frames>" should have a "title" attribute

  • ALM used: Azure DevOps
  • CI system used: Azure DevOps
  • Languages of the repository: html


While analyzing an HTML file, bug "<frames> should have a title attribute" was reported in an hidden iframe like this:

        <iframe src=""
                height="0" width="0" style="display:none;visibility:hidden"></iframe>

Adding a title is not good for this as it’s not meant for users, so browser should not display it and screen readers not mention it.

Some suggest adding tabindex=“-1” to indicate users can never get to it when moving focus, but that didn’t work for sonarcloud.

Are there any way to make Sonarcloud understand that is not part of application content? I believe the CSS properties and tabindex do that for user agents.

I know we can easily mark as won’t fix, but I’m wondering if that code could be improved to best show its intent.

1 Like

Hi @Luiz_Soares,

thanks for reporting this. I created a ticket to track this as a possible improvement for the rule.

In the meantime, I would recommend setting it as ‘Won’t fix’ or ‘False positive’ in Sonarcloud.