Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
Basically I am trying to avoid reports like this without having to add the attribute to each and every font awesome icon ...
Copy link to clipboard
Copied
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>
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
In 2017 Preferences, filter errors & warnings. See below.
The whole issue of whether to use <i>, <span> or <img> tags gets a little blurry. See link below for a good discussion about it.
html - Should I use <i> tag for icons instead of <span>? - Stack Overflow
Nancy
Copy link to clipboard
Copied
The Filter settings don't do anything in either CC2015 or CC2017 for me.
Items on the hidden list still come up in both the Site Report and the Validation windows.
Even unchecking both the error and warning boxes doesn't stop them from coming up in the Site Report, the validation window will be empty though.
Copy link to clipboard
Copied
Jon Fritz II wrote:
What is the full code of one of your <i></i> tagsets that throws the error?
<i class="fa fa-pencil" aria-hidden="true"></I> = No Error
<i class="fa fa-pencil"></I> = Error
Copy link to clipboard
Copied
Weird, alt is not a required attribute in <i> tagsets. I also do not get the error while using the same code.
Looks like DW is getting confused by something.
Are you using something other than the HTML5 doctype ( <!doctype html> ) on the first line of the page?
Are there any structural errors (like unclosed elements) in your html?
Copy link to clipboard
Copied
It is weird. I can't reproduce it either. Win10, 64-bit.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now