User prefs diff to explore #50

Closed
wants to merge 10 commits into
from

Projects

None yet

3 participants

@scottjehl
Owner

No description provided.

scottjehl and others added some commits Mar 15, 2012
scottjehl null commit - update ghpages, update! 794dbb0
scottjehl This branch is a div-based equivalent of the picture element markup p…
…attern. It can be used today without concern for running into problems with differences in future picture implementations. That said, it will always be tied to JavaScript, and the markup is a little clunky to those with an eye for semantics.
1bb548a
scottjehl oh alerts? oldskoo. gone a548592
scottjehl following up with the same fix for the div branch, addressing #11 4af59f1
Scott Jehl Implemented a sample behavior for resolution switching in HD environm…
…ents based on user prefs
6baa8aa
Scott Jehl persist prefs in localStorage if possible 86a1ab8
Scott Jehl styles c984e30
Scott Jehl updates, merges from master 35d2902
Scott Jehl updated markup 95ee9ad
@Wilto Wilto Throttling the resize event prevents small-screen browsers from trigg…
…ering multiple resize events as high-res images are loaded in.
25db27b
@scottjehl

Nice change. Could this line just be w.setTimeout( w.picturefill, 150 ); ?

@staabm staabm commented on the diff Dec 7, 2012
picturefill.js
}
}
+
+ var picImg = ps[ i ].getElementsByTagName( "img" )[ 0 ];
+
+ if( matches.length ){
+
+ if( !picImg ){
+ picImg = w.document.createElement( "img" );
+ picImg.alt = ps[ i ].getAttribute( "data-alt" );
@staabm
staabm Dec 7, 2012

Couldn't it take the alt description from the image inside the noscript tag, so we don't need tp define the alt text twice?

@staabm
staabm Jun 26, 2013

@scottjehl just curious.. why do you define the ALT twice?

@scottjehl
scottjehl Jun 26, 2013

I believe it was a result of cross-browser difficulty in easily accessing that fallback image and its alt.

@staabm
staabm Jun 26, 2013

are you open for a PR regarding this?

@scottjehl
scottjehl Jun 26, 2013

Hmm. Not sure, I'd take a look, but it seems an alt on the picture element itself is a good place for it moving forward, whereas the fallback image is meant to be an uninvolved fallback (whether it's an image, text, or whatever makes sense)

@scottjehl
scottjehl Jun 26, 2013

Just interested in reducing the repetition there?

@staabm
staabm Jun 26, 2013

yes, just because of the repetition. the image needs the alt tag for semantic and seo reasons. and the data-picture could re-use it (just in case there is no data-alt defined).

@scottjehl
scottjehl Jun 26, 2013
@Wilto
Wilto Jun 26, 2013

This change would match up a little closer with the picture spec, too. I talked it over with a bunch of A11y Task Force folks a while back, and they think it’s best that the fallback content serves as the a11y content.

See all eight chapters of: http://lists.w3.org/Archives/Public/public-html/2012Sep/0029.html

@scottjehl
Owner

I'm going to keep this as a branch.

@scottjehl scottjehl closed this Jun 26, 2013
@albell albell deleted the user-prefs branch Sep 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment