Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do tracking pixels need to have alt attributes for accessibility (WCAG 2.0)?

We are running a website and have 3rd party tracking pixels, but we're receiving alt attribute errors when doing a webaim/WCAG 2.0 scan on our site.

I'm not sure if in this situation the tracking pixels actually need to still have a blank alt attribute or would some screen readers still read the src?

like image 550
Abe Avatar asked Nov 03 '16 19:11

Abe


People also ask

Is it necessary for an image to use an alt tag to be accessible?

If no alt attribute is present, the screen reader will read the file name for the image instead, which can be a major distraction to those using screen-reading technology.

Why are alt tags important for accessibility?

Also referred to as an alt description or an alt attribute, alt text is critical for those with disabilities because it describes the function and appearance of a photo or graphic they cannot see. PDF documents often contain images that convey critical information to the reader.

What is an accessible alt attribute?

Deciding what to include and what not to include in an image's alt description is a grey area in web accessibility. Alt attributes (or alternative attributes) are textual descriptions of images added to the HTML code that a screen reader will read to a user as they navigate through a webpage.

Why the alt attribute is important to navigation?

Alt Tags for Accessibility The web should be easy for everyone to navigate. Those with visual impairments and other disabilities who use screen readers when browsing the web rely on alt tags so that images may be described to them, and to help provide more context and information about the content of a webpage.


1 Answers

alt="" is the most appropriate approach in this case - this tells the screenreader that the image is purely decorative and should be ignored. Since tracking pixels do not visually convey information, they are essentially decorative from this point of view.

If no ALT is present, some screenreaders will fallback to reading the image name (without extension) instead, which you generally don't want.

Some screenreaders (JAWS) may ignore 1x1 or similarly sized small images - but still best to put alt="" as that's the best practice.

Some references:

  • WebAIM, Alternate Text, Decorative Images
  • WAI tutorial on Decorative Images
  • Using null alt text and no title attribute on img elements for images that AT should ignore
like image 197
BrendanMcK Avatar answered Oct 20 '22 15:10

BrendanMcK