Jetpack: Stats Smiley/Pixel Img Doesn't Have Alt Attribute

Created on 20 Oct 2015  路  6Comments  路  Source: Automattic/jetpack

For accessibility purposes (and in order to be valid HTML), all <img> tags are required to have an alt attribute, even if that attribute is empty. The stats smiley that gets generated by Jetpack does not seem to have an alt attribute.

The sample smiley HTML currently looks like:

<img src="http://pixel.wp.com/g.gif?v=ext&amp;j=1%3A3.7.2&amp;blog=19082149&amp;post=769&amp;tz=-4&amp;srv=example.com&amp;host=example.com&amp;ref=&amp;rand=0.1583563662134111" id="wpstats">

It should look like:

<img src="http://pixel.wp.com/g.gif?v=ext&amp;j=1%3A3.7.2&amp;blog=19082149&amp;post=769&amp;tz=-4&amp;srv=example.com&amp;host=example.com&amp;ref=&amp;rand=0.1583563662134111" id="wpstats" alt="">

Stats [Type] Enhancement

Most helpful comment

Fixed in r134484-wpcom

All 6 comments

@jeherve looks like it's just a change on WordPress.com, e.js and w.js? Want me to jump in and do that or?

@jeherve looks like it's just a change on WordPress.com, e.js and w.js? Want me to jump in and do that or?

That seems like a safe change, but it might be best to run it by the
Data team to be sure.

@jonathansadowski What do you think?

Thanks @egill, it'd be great if you're able to. I tried looking for any discussion of why an alt attribute may have been purposely omitted, but couldn't find one, and I can't think of any reason we wouldn't want to include an alt attribute, so :+1: from me.

@egill It might be worth addressing #1963 as well at the same time, since the 2 changes are related.

Fixed in r134484-wpcom

Was this page helpful?
0 / 5 - 0 ratings