The HTML rule "<strong>" and "<em>" tags should be used

The rule <strong> and <em> tags should be used" contains the exptions as follows:

Exceptions

This rule is relaxed in case of [icon fonts] usage.
<i class="..." aria-hidden="true" /> <!-- Compliant icon fonts usage -->

But it still found a bug by this rule, when it scaned the source code as follow:
<i class="el-icon-caret-bottom" />

I think it clear that the code is in the excetions.
Is it a bug for reportting the issue?

Hallo @liuxl,

thank you for raising this point. The important part of the exception is aria-hidden="true".
This leads to the hiding of elements such as icons for users using assistive technology.

So in you case <i class="el-icon-caret-bottom" aria-hidden="true" /> would pass the rule. Maybe have a look at the Mozilla Web Docs for a better explanation.

If you don’t want to follow this recommendation, you can simply disable this rule in your Quality Profile. I hope that I could help you.

Best,
Nils

Thanks for your reply!

The Mozilla Web Docs say " According to the fourth rule of ARIA, aria-hidden="true" should not be used on a focusable element. Additionally, since this attribute is inherited by an element’s children, it should not be added onto the parent or ancestor of a focusable element."

The developer used the code to define a button that is focusable. It seems he can not add “aira-hidden=true” here.

En,perhap I have no choices but disable this rule. It is a pity. I still think it make sense to use instead of ,the intention of this rule.