I'm running the Accessibility Name & Description Inspector tool against my web page and it is reporting this hidden content CSS alert:
CSS Content Alerts: (1) Content has been injected using CSS pseudo-elements ::before or ::after.
This is the part of the HTML that is causing the error:
<i _ngcontent-nbn-c320="" role="img" class="glyphicon glyphicon-volume-off hANDI508-
hasHiddenCssContent" title="alerts sounding" ng-reflect-ng-class="[object Object]">
Specifically, this is the CSS class that is causing it:
glyphicon-volume-off:before{content:"\e036"}
It doesn't like the content:"\e036".
It wants me to not have it, but if I do, my glyphicon won't show on the page.
What can I do so it doesn't report it? Is there a way?
You cannot disable the warning, because content in pseudo-elements is an inherent accessibility failure:
You can, however, ignore the warning if the content is decorative, or if you include the substance of the inserted content elsewhere in a location that is accessible via a screen reader or other assistive technology. You can do that via
titleoraria-labelattributes in the element, or depending on the situation, use the.sr-onlyclass on a descriptive text element if you're using Bootstrap.Keep in mind ANDI states that an alert is not necessarily a problem:
See ANDI's guidance on how to handle this from their Alerts documentation: