I have the below code, which is a button tag inside that I have a icon inside tag ( previously I added tag to show the icon, but then had to change to because there was a SonarQube code smell issue saying I should not use tag.)
<button class="" aria-label = "click refresh icon to reset amount value">
<em class=""></em>
<em class=""></em>
</button>
With the above code, I am getting a code smell issue that says "Add text to this tag " .
I have tried all possible fixes, adding aria-label, aria-labelledBy, title attribut within the button and em tags, but nothing helped in resolving the issue.
After adding the below code, it helped in resolving the issue, but I am skpetical to add this piece of code, would like to know if there is any other solution that would help here. Any help is much appreciated, thanks !.
<button class="" aria-label = "click refresh icon to reset amount value">
<span style="visibility:hidden">Refresh Icon</span>
<em class=""></em>
<em class=""></em>
</button>