# \#html

**URL:** https://community.sonarsource.com/tag/html/11.md

[Latest](https://community.sonarsource.com/latest.md) · [Categories](https://community.sonarsource.com/categories.md) · [Tags](https://community.sonarsource.com/tags.md)

---

## [\[Web:S6853\] "A form label must be associated with a control."](https://community.sonarsource.com/t/web-s6853-a-form-label-must-be-associated-with-a-control/112370)

<div class="topic-metadata">

**Author:** [@H.Lo](https://community.sonarsource.com/u/H.Lo)\
**Replies:** 6\
**Last updated:** [May 28, 2026, 2:39pm UTC](https://community.sonarsource.com/t/web-s6853-a-form-label-must-be-associated-with-a-control/112370 "2026-05-28T14:39:39Z")

</div>

\<ul class="ProviderType Checkboxing"\> \<li th:each="type : ${ webData.enumsMap.get('Provider.Type') }"\> \<input type="checkbox" th:id="${'chk\_'+type}" name="providerType" th:value="${type}"/\> \<label th:for="${'chk\_'+t…

---

## [Running JsSecuritySensorV2 on inline javascript](https://community.sonarsource.com/t/running-jssecuritysensorv2-on-inline-javascript/180980)

<div class="topic-metadata">

**Author:** [@val3rius](https://community.sonarsource.com/u/val3rius)\
**Replies:** 0\
**Last updated:** [April 9, 2026, 9:13pm UTC](https://community.sonarsource.com/t/running-jssecuritysensorv2-on-inline-javascript/180980 "2026-04-09T21:13:25Z")

</div>

Hiya, We are seeing an increase of vibe coded minor applications in our org, often with security issues like Dom-based XSS in inline javascript. I was surprised to see that Sonar don’t pick these up at all. Is there an…

---

## [XPath rule template for HTML](https://community.sonarsource.com/t/xpath-rule-template-for-html/175650)

<div class="topic-metadata">

**Author:** [@aigel](https://community.sonarsource.com/u/aigel)\
**Replies:** 4\
**Last updated:** [March 31, 2026, 2:12pm UTC](https://community.sonarsource.com/t/xpath-rule-template-for-html/175650 "2026-03-31T14:12:49Z")

</div>

Hello everyone, I hope you are all doing well. We have been using SonarQube successfully for several years and truly value the product and its continuous evolution. I would like to share some feedback regarding the HTM…

---

## [Track missing expected attributes](https://community.sonarsource.com/t/track-missing-expected-attributes/179339)

<div class="topic-metadata">

**Author:** [@aigel](https://community.sonarsource.com/u/aigel)\
**Replies:** 2\
**Last updated:** [March 13, 2026, 9:46am UTC](https://community.sonarsource.com/t/track-missing-expected-attributes/179339 "2026-03-13T09:46:39Z")

</div>

There is already a template rule, which allows to define rules for tracking disallowed attributes (Web:IllegalAttributeCheck). However, for accessibility and other use cases, you often need the opposite: the ability to d…

---

## [WCAG 2.1 AA+ accessibility rules in SonarQube](https://community.sonarsource.com/t/wcag-2-1-aa-accessibility-rules-in-sonarqube/177930)

<div class="topic-metadata">

**Author:** [@gab](https://community.sonarsource.com/u/gab)\
**Replies:** 4\
**Last updated:** [February 27, 2026, 3:04pm UTC](https://community.sonarsource.com/t/wcag-2-1-aa-accessibility-rules-in-sonarqube/177930 "2026-02-27T15:04:10Z")

</div>

Hello Community, We’ve added new accessibility rules for Web Content Accessibility Guidelines (WCAG) criteria: WCAG 2.1 A: 60% coverage (18 of 30 requirements) WCAG 2.1 AA: 52% coverage (26 of 50 requirements) WCAG 2.…

---

## [Possible false positives on rule Web:UnclosedTagCheck](https://community.sonarsource.com/t/possible-false-positives-on-rule-web-unclosedtagcheck/177766)

<div class="topic-metadata">

**Author:** [@ivandalbosco](https://community.sonarsource.com/u/ivandalbosco)\
**Replies:** 2\
**Last updated:** [February 23, 2026, 11:10am UTC](https://community.sonarsource.com/t/possible-false-positives-on-rule-web-unclosedtagcheck/177766 "2026-02-23T11:10:03Z")

</div>

Hello, I think the following issue on a regex in a .php file is a false positive : $pattern = ‘@(\<a\\\[^\>\\\]+?href=“(\\\[^”\\\]\*)"\\\[^\>\\\]\*?\>(.+?))@i’; I think the following issue in a .twig template file is also a false po…

---

## [FP: S6819 - The ARIA "img" role should be allowed on SVG images](https://community.sonarsource.com/t/fp-s6819-the-aria-img-role-should-be-allowed-on-svg-images/115306)

<div class="topic-metadata">

**Author:** [@dougw](https://community.sonarsource.com/u/dougw)\
**Replies:** 8\
**Last updated:** [February 3, 2026, 8:26am UTC](https://community.sonarsource.com/t/fp-s6819-the-aria-img-role-should-be-allowed-on-svg-images/115306 "2026-02-03T08:26:46Z")

</div>

What language is this for? HTML & JS/TS Which rule? S6819 Why do you believe it’s a false-positive/false-negative? Quoting from ARIA: img role - Accessibility | MDN: If you are using embedded SVG images in your…

---

## [S6853 Triggers on .NET MVC Razor cshtml files](https://community.sonarsource.com/t/s6853-triggers-on-net-mvc-razor-cshtml-files/133736)

<div class="topic-metadata">

**Author:** [@Keith.Banner](https://community.sonarsource.com/u/Keith.Banner)\
**Replies:** 2\
**Last updated:** [December 19, 2025, 5:23pm UTC](https://community.sonarsource.com/t/s6853-triggers-on-net-mvc-razor-cshtml-files/133736 "2025-12-19T17:23:41Z")

</div>

What language is this for? HTML Which rule? S6853 Why do you believe it’s a false-positive/false-negative? asp-for should be treated a valid way of associating a form label with a control. When the field is generated it…

---

## [A false-positive warning in Sonar rule S6819 for valid use of role="region"](https://community.sonarsource.com/t/a-false-positive-warning-in-sonar-rule-s6819-for-valid-use-of-role-region/152747)

<div class="topic-metadata">

**Author:** [@ajaymalhotra](https://community.sonarsource.com/u/ajaymalhotra)\
**Replies:** 5\
**Last updated:** [November 26, 2025, 3:36pm UTC](https://community.sonarsource.com/t/a-false-positive-warning-in-sonar-rule-s6819-for-valid-use-of-role-region/152747 "2025-11-26T15:36:28Z")

</div>

What language is this for? TypeScript / Angular HTML templates Which rule? Rule: S6819 – Prefer tag over ARIA role Why do you believe it’s a false-positive? This warning is a false positive because the rule incorr…

---

## [Comments for .twig files](https://community.sonarsource.com/t/comments-for-twig-files/152534)

<div class="topic-metadata">

**Author:** [@Improve1785](https://community.sonarsource.com/u/Improve1785)\
**Replies:** 1\
**Last updated:** [November 17, 2025, 3:16pm UTC](https://community.sonarsource.com/t/comments-for-twig-files/152534 "2025-11-17T15:16:58Z")

</div>

Currently, .twig files are checked by ht HTML Scanner ( Jira ) It seems that twig is not fully supported - for example comments in twig are scanned like normal code: {# \<input id="test" placeholder="test1" /\> #} \<input…

---

## [Java Exception on PHP short tags](https://community.sonarsource.com/t/java-exception-on-php-short-tags/119629)

<div class="topic-metadata">

**Author:** [@George\_L](https://community.sonarsource.com/u/George_L)\
**Replies:** 8\
**Last updated:** [October 25, 2025, 3:31pm UTC](https://community.sonarsource.com/t/java-exception-on-php-short-tags/119629 "2025-10-25T15:31:47Z")

</div>

Hi there, I am using a local Windows installation of SonarQube Community edition v10.6 with the mebedded database. I am scanning a PHP project in which I us PHP short tags, e.g. \<?= $myInteger++ ?\> . My sonar.propertie…

---

## [Custom Sonar Rule for HTML/Web](https://community.sonarsource.com/t/custom-sonar-rule-for-html-web/149659)

<div class="topic-metadata">

**Author:** [@Evan\_Bourque](https://community.sonarsource.com/u/Evan_Bourque)\
**Replies:** 1\
**Last updated:** [October 1, 2025, 1:17pm UTC](https://community.sonarsource.com/t/custom-sonar-rule-for-html-web/149659 "2025-10-01T13:17:18Z")

</div>

The documentation includes general guidance on adding coding rules, including which languages support adding custom rules, and general guidance on how to go about it. If the docs don’t answer your question, please tell …

---

## [HTML: RSPEC-1085 requires that every data table has a description](https://community.sonarsource.com/t/html-rspec-1085-requires-that-every-data-table-has-a-description/104119)

<div class="topic-metadata">

**Author:** [@ChristopheS](https://community.sonarsource.com/u/ChristopheS)\
**Replies:** 6\
**Last updated:** [August 21, 2025, 10:44am UTC](https://community.sonarsource.com/t/html-rspec-1085-requires-that-every-data-table-has-a-description/104119 "2025-08-21T10:44:56Z")

</div>

Based on RSPEC-1085, SonarLint requires that each table has a description, which may be provided as a caption element, referenced by means of aria-describedby or provided as an aria-label attribute. (I am ignoring the ol…

---

## [False positive for S1082 (Angular keyup.enter event not recognized)](https://community.sonarsource.com/t/false-positive-for-s1082-angular-keyup-enter-event-not-recognized/114253)

<div class="topic-metadata">

**Author:** [@rdimitrov](https://community.sonarsource.com/u/rdimitrov)\
**Replies:** 11\
**Last updated:** [May 12, 2025, 11:45am UTC](https://community.sonarsource.com/t/false-positive-for-s1082-angular-keyup-enter-event-not-recognized/114253 "2025-05-12T11:45:46Z")

</div>

Hello, since a couple of days the HTML analysis of our Angular 17 application fails with an unfulfilled S1082 Mouse events should have corresponding keyboard events concerning interactive \<div\> elements: \<div role="but…

---

## [Web:S5255 does not understand Vue's v-if](https://community.sonarsource.com/t/web-s5255-does-not-understand-vues-v-if/138033)

<div class="topic-metadata">

**Author:** [@Jak-Ch-ll](https://community.sonarsource.com/u/Jak-Ch-ll)\
**Replies:** 1\
**Last updated:** [April 3, 2025, 1:08pm UTC](https://community.sonarsource.com/t/web-s5255-does-not-understand-vues-v-if/138033 "2025-04-03T13:08:33Z")

</div>

The rule Web:S5255 triggers in Vue templates for elements with the same landmark role, even if these are made mutually exclusive via control flow directives (v-if, v-else, v-else-if). This issue can be reproduced with t…

---

## [SonarQube for IDE: Visual Studio 8.11 - HTML and T-SQL support, AI CodeFix suggestions diff view](https://community.sonarsource.com/t/sonarqube-for-ide-visual-studio-8-11-html-and-t-sql-support-ai-codefix-suggestions-diff-view/134886)

<div class="topic-metadata">

**Author:** [@Farah](https://community.sonarsource.com/u/Farah)\
**Replies:** 0\
**Last updated:** [February 10, 2025, 12:24pm UTC](https://community.sonarsource.com/t/sonarqube-for-ide-visual-studio-8-11-html-and-t-sql-support-ai-codefix-suggestions-diff-view/134886 "2025-02-10T12:24:28Z")

</div>

Hello Visual Studio community, The SonarQube for IDE: Visual Studio version 8.11 is now available! We’re excited to announce that this new version brings the support for two new languages: HTML analysis is now availa…

---

## [Typescript RSPEC-6819 should not always require HTML's output element instead of ARIA status role](https://community.sonarsource.com/t/typescript-rspec-6819-should-not-always-require-htmls-output-element-instead-of-aria-status-role/133611)

<div class="topic-metadata">

**Author:** [@ChristopheS](https://community.sonarsource.com/u/ChristopheS)\
**Replies:** 2\
**Last updated:** [January 24, 2025, 3:50pm UTC](https://community.sonarsource.com/t/typescript-rspec-6819-should-not-always-require-htmls-output-element-instead-of-aria-status-role/133611 "2025-01-24T15:50:12Z")

</div>

The Typescript rule RSPEC-6819: Prefer tag over ARIA role is applied a bit too broadly. This can be observed both with SonarLint in VSCodium and with SonarQube. Snippet to reproduce the issue \<form\> \<p\>\<label for="te…

---

## [New rule: flag the non-existent attribute aria-role (instead of "role")](https://community.sonarsource.com/t/new-rule-flag-the-non-existent-attribute-aria-role-instead-of-role/133836)

<div class="topic-metadata">

**Author:** [@ChristopheS](https://community.sonarsource.com/u/ChristopheS)\
**Replies:** 1\
**Last updated:** [January 24, 2025, 2:02pm UTC](https://community.sonarsource.com/t/new-rule-flag-the-non-existent-attribute-aria-role-instead-of-role/133836 "2025-01-24T14:02:01Z")

</div>

Rule description: flag the attribute aria-role. Why is aria-role an issue? The intended attribute is role. Unlike all other attributes defined in the W3C’s WAI-ARIA specification, it does not start with “aria-”, so it …

---

## [New HTML rule: disallow wrapping of legend in a div](https://community.sonarsource.com/t/new-html-rule-disallow-wrapping-of-legend-in-a-div/126597)

<div class="topic-metadata">

**Author:** [@ChristopheS](https://community.sonarsource.com/u/ChristopheS)\
**Replies:** 3\
**Last updated:** [January 17, 2025, 4:05pm UTC](https://community.sonarsource.com/t/new-html-rule-disallow-wrapping-of-legend-in-a-div/126597 "2025-01-17T16:05:36Z")

</div>

I often see front-end developers wrap a legend element in a div in order to have more styling options. Unfortunately, that makes the legend element useless. Rule: the legend element must always be the first child elemen…

---

## [The tag "wbr" has no corresponding closing tag (false positive)](https://community.sonarsource.com/t/the-tag-wbr-has-no-corresponding-closing-tag-false-positive/133110)

<div class="topic-metadata">

**Author:** [@KsaR99](https://community.sonarsource.com/u/KsaR99)\
**Replies:** 1\
**Last updated:** [January 10, 2025, 3:06pm UTC](https://community.sonarsource.com/t/the-tag-wbr-has-no-corresponding-closing-tag-false-positive/133110 "2025-01-10T15:06:37Z")

</div>

Hello, there! Operating system: Windows 11 SonarQube for IntelliJ plugin version: 10.14.1.80220 IntelliJ version: WebStorm 2024.3.1.1 Is connected mode used: No. I’m getting false-positive for setting “Web:UnclosedTag…

---

## [S6842 false positive for radiogroup](https://community.sonarsource.com/t/s6842-false-positive-for-radiogroup/124438)

<div class="topic-metadata">

**Author:** [@tkenbw](https://community.sonarsource.com/u/tkenbw)\
**Replies:** 2\
**Last updated:** [September 25, 2024, 9:09am UTC](https://community.sonarsource.com/t/s6842-false-positive-for-radiogroup/124438 "2024-09-25T09:09:02Z")

</div>

SonarQube Enterprise Edition v10.6 (92116) In my vue component I have a fieldset marked with the radiogroup role: \<fieldset role="radiogroup" :aria-required="props.required" :aria-invalid="v…

---

## [Ability to add custom rules in HTML code to check if token variables match the supported token list](https://community.sonarsource.com/t/ability-to-add-custom-rules-in-html-code-to-check-if-token-variables-match-the-supported-token-list/125645)

<div class="topic-metadata">

**Author:** [@Tina\_Tran](https://community.sonarsource.com/u/Tina_Tran)\
**Replies:** 1\
**Last updated:** [September 23, 2024, 9:59am UTC](https://community.sonarsource.com/t/ability-to-add-custom-rules-in-html-code-to-check-if-token-variables-match-the-supported-token-list/125645 "2024-09-23T09:59:58Z")

</div>

Hi all, In my HTML projects, we need to check if the tokens defined by developers in their source code are included in the list of tokens we support. For example, if the code has tokens like {{User.firstname}} and {{Us…

---

## [Rel noopener issue on window.open](https://community.sonarsource.com/t/rel-noopener-issue-on-window-open/124560)

<div class="topic-metadata">

**Author:** [@Taylor\_Ackley](https://community.sonarsource.com/u/Taylor_Ackley)\
**Replies:** 6\
**Last updated:** [September 23, 2024, 7:25am UTC](https://community.sonarsource.com/t/rel-noopener-issue-on-window-open/124560 "2024-09-23T07:25:44Z")

</div>

Make sure to read this post before raising a thread here: Then tell us: What language is this for? JavaScript Which rule? RSPEC-5148 Why do you believe it’s a false-positive/false-negative? adding a windowFeatures s…

---

## [Problems using sonarqube](https://community.sonarsource.com/t/problems-using-sonarqube/125104)

<div class="topic-metadata">

**Author:** [@Murphy\_Probgw](https://community.sonarsource.com/u/Murphy_Probgw)\
**Replies:** 2\
**Last updated:** [September 18, 2024, 1:57am UTC](https://community.sonarsource.com/t/problems-using-sonarqube/125104 "2024-09-18T01:57:29Z")

</div>

I have been involved in multiple projects. Each of which has its own code smell or bugs. I need to analyze and judge these code smell and bugs. But why can some projects have four options for analysis: for example, re…

---

## [Razor pages - .cshtml files and tag helpers](https://community.sonarsource.com/t/razor-pages-cshtml-files-and-tag-helpers/124013)

<div class="topic-metadata">

**Author:** [@embell-relias](https://community.sonarsource.com/u/embell-relias)\
**Replies:** 3\
**Last updated:** [August 29, 2024, 1:37pm UTC](https://community.sonarsource.com/t/razor-pages-cshtml-files-and-tag-helpers/124013 "2024-08-29T13:37:03Z")

</div>

We have a section of code like this in a Razor page (.cshtml) file: \<div class="form-group"\> \<label asp-for="Input.UserName" class="control-label"\>User\</label\> \<input asp-for="Input.UserName" class="form-control" plac…

---

## [Code Inclusion for mvn sonar scanned project](https://community.sonarsource.com/t/code-inclusion-for-mvn-sonar-scanned-project/120934)

<div class="topic-metadata">

**Author:** [@jeff-knurek](https://community.sonarsource.com/u/jeff-knurek)\
**Replies:** 2\
**Last updated:** [August 22, 2024, 3:26am UTC](https://community.sonarsource.com/t/code-inclusion-for-mvn-sonar-scanned-project/120934 "2024-08-22T03:26:33Z")

</div>

I have a project that was scanned with Automated (github) integration, and now is being scanned via CI (circleci). When viewing the Automated project in Sonarcloud, I can see all the languages for code that are in the r…

---

## [Question about rule 'Mouse events should have corresponding keyboard events'](https://community.sonarsource.com/t/question-about-rule-mouse-events-should-have-corresponding-keyboard-events/9300)

<div class="topic-metadata">

**Author:** [@melgish](https://community.sonarsource.com/u/melgish)\
**Replies:** 9\
**Last updated:** [July 23, 2024, 12:39pm UTC](https://community.sonarsource.com/t/question-about-rule-mouse-events-should-have-corresponding-keyboard-events/9300 "2024-07-23T12:39:39Z")

</div>

SonarQube 7.7 Community, SonarHTML 3.2 (build1615) \<button class="btn btn-outline-danger" (click)="cancel()"\>Cancel\</button\> Recently upgraded to 7.7 and now seeing the bug Web:MouseEventWithoutKeyboardEquivalentCheck …

---

## [HTML: RSPEC-1097 flags inputs wrapped in label elements](https://community.sonarsource.com/t/html-rspec-1097-flags-inputs-wrapped-in-label-elements/105298)

<div class="topic-metadata">

**Author:** [@ChristopheS](https://community.sonarsource.com/u/ChristopheS)\
**Replies:** 1\
**Last updated:** [March 30, 2024, 9:48am UTC](https://community.sonarsource.com/t/html-rspec-1097-flags-inputs-wrapped-in-label-elements/105298 "2024-03-30T09:48:29Z")

</div>

Based on RSPEC-1097 SonarLint in VS Code issues error messages for the input elements in the following code: \<form\> \<fieldset\> \<legend\>Gender\</legend\> \<p\>\<label\>\<input name="gender" type="radio" value="fe"\> Fe…

---

## [Detecting Polyfill.io CDN references](https://community.sonarsource.com/t/detecting-polyfill-io-cdn-references/117924)

<div class="topic-metadata">

**Author:** [@daveh](https://community.sonarsource.com/u/daveh)\
**Replies:** 5\
**Last updated:** [July 9, 2024, 12:15pm UTC](https://community.sonarsource.com/t/detecting-polyfill-io-cdn-references/117924 "2024-07-09T12:15:13Z")

</div>

I see there is an old thread but I thought I’d create a new one in light of yesterday’s discover of a supply chain attack. It would be good to be able to set a blacklist of CDN urls, so that we do not accidentally includ…

---

## [Rule to detect external or CDN references in HTML?](https://community.sonarsource.com/t/rule-to-detect-external-or-cdn-references-in-html/94795)

<div class="topic-metadata">

**Author:** [@fredissy](https://community.sonarsource.com/u/fredissy)\
**Replies:** 2\
**Last updated:** [July 9, 2024, 12:12pm UTC](https://community.sonarsource.com/t/rule-to-detect-external-or-cdn-references-in-html/94795 "2024-07-09T12:12:32Z")

</div>

Hello, My company deploys sensitive applications, for which all content (pages, API calls, JS, web resources) must be served from an unique domain name. We are not allowed to use content from a 3rd party website, CDN or…

[Next page](https://community.sonarsource.com/tag/html/11.md?match_all_tags=true&page=1&tags%5B%5D=html)
