I'm trying to setup picturefill.js to deliver responsive images. When I use the srcset attribute instead of the src attribute to avoid a double download, the default images alt text is consistently showing up before picturefill.js has a chance to have the correct image rendered.
<!DOCTYPE html>
<html lang="en">
<head>
<script>document.createElement( "picuture" );</script>
<script async src="js/picturefill.min.js"></script>
</head>
<body>
<picture>
<source srcset="desktop.jpg" media="(min-width: 768px)">
<img srcset="mobile.jpg" alt="...">
</picture>
</body>
</html>
I'm just wondering if this is a known issue and whether there's a workaround. Only 1 of 3 devices I've tested on that don't fully support the picture element (they get the double download, if I use the src attribute) doesn't display the alt text with the srcset attribute; namely, my speedy iPhone 6; my slower iPhone 4 and iPad 1 display the alt text, and am just wondering if it's simply the speed of the device that'll make it look like it's NOT displaying.
The only real drawback I've seen people talk about regarding the use of picturefill.js is in regards to leaving out the src attribute to avoid the double download, leaving those without javascript the default images alt text -- nothing regarding the temp. rendering of the alt text while the scripting is finishing, which almost seems just as bad or worse than the double download.