How to scan accessibility issues using SonarQube?


  • We are using SonarQube version 7.9.
  • We are trying to scan our code for accessibility issues and we want to leverage SonarQube for the same to report any accessibility issues and help improve our org’s UI.
  • As of now, we have found only 14 rules available in Sonar HTML profile for the same. We tried some Open Source plugins such as tanaguru, but none of them seems to be working.

Has anyone been through the same situation?
Has anyone had the experience to handle this in a better way, may be integrating other tools to scan accessibility issues into SonarQube somehow.

I tried pretty much all the resources available online, but havent had much help.

Kindly help.

Thank you,

Hi @kkaur,

As of now, SonarHTML has 21 rules relating to accessibility. However, it’s not always easy for SonarHTML to find potential issues, as HTML is often embedded in templates (although it does a pretty good job of detecting it in many cases).

If you build your UI using a JS framework, you can check if ESLint has some rules specific to your framework. For instance, SonarQube’s UI is built using ReactJS, and we leverage the eslint-plugin-jsx-a11y plugin to find accessibility issues in our code, and use SonarJS’s ability to import ESLint issues to see them in SonarQube. I hope this give’s you some pointers.