Skip to main content
Brad Lawryk
Legend
December 12, 2016
Question

aria-hidden="true"

  • December 12, 2016
  • 2 replies
  • 1684 views

Hey there,

Seems that when DW reports checks for missing alt tags it shows an error/caution on ever Font Awesome icon. Since I only build internal dashboard applications I do not need title or alt tags on every icon. Don't need them on any of them at all actually.

I know I can add aria-hidden="true" to the <I> tag but I have to do it to every single on and I use a lot of them.

So my question is; is there a way to add it globally or even page level in the head or CSS file so that alt tags are ignored on all icon tags rather than having to add it to each tag?

    This topic has been closed for replies.

    2 replies

    Nancy OShea
    Community Expert
    Community Expert
    December 12, 2016

    I use a lot of FontAwesome icons too and I don't have any warnings about them in DW.  Nothing shows up about them in Site Reports, Output or Validator.

    Example:

    <i class="fa fa-balance-scale fa-2x"></i>

    Nancy O'Shea— Product User & Community Expert
    Brad Lawryk
    Legend
    December 12, 2016

    Thanks Nancy,

    I wonder if there is a setting in the validation settings in the preference panel. I get the warnings every time if I don't add the attribute to each one. I'll look into that.

    Jon Fritz
    Community Expert
    Community Expert
    December 13, 2016

    The validator uses the W3C algorithm and pulls directly from their website, it's not an internal validation system within DW, so there aren't any preferences you can set.

    Italic tags, in and of themselves, don't require an alt attribute under any html doctype that I've ever seen.

    What is the full code of one of your <i></i> tagsets that throws the error?

    Brad Lawryk
    Legend
    December 12, 2016

    Basically I am trying to avoid reports like this without having to add the attribute to each and every font awesome icon ...