Slideshow transcript
Slide 1: Reward & Punishment or Progressive Enhancement & Intentional Degradation by Elliot Jay Stocks elliotjaystocks.com/geeknight
Slide 2: What Is a Reward?
Slide 3: What Is a Reward? A visual treat for the more capable browser
Slide 4: What Is a Reward? A visual treat for the more capable browser, e.g: Drop shadows on text (CSS3 spec, Safari / Opera 9.5) Full PNG alpha transparency (no IE6 without hack) si8.shauninman.com
Slide 5: What Is a Reward? A visual treat for the more capable browser, e.g: Drop shadows on text (CSS3 spec, Safari / Opera 9.5) Full PNG alpha transparency (no IE6 without hack)
Slide 6: What Is a Punishment?
Slide 7: What Is a Punishment? A decision to REMOVE visual treats
Slide 8: What Is a Punishment? A decision to REMOVE visual treats • The designer giveth... and the designer taketh away! Just because a browser supports a feature doesn’t mean you have to offer it
Slide 9: What Is a Punishment? A decision to REMOVE visual treats • The designer giveth... and the designer taketh away! Just because a browser supports a feature doesn’t mean you have to offer it • Don’t be forced into hacking Feature support can require complex hacks and it’s often not necessary
Slide 10: What Is a Punishment? A decision to REMOVE visual treats • The designer giveth... and the designer taketh away! Just because a browser supports a feature doesn’t mean you have to offer it • Don’t be forced into hacking Feature support can require complex hacks and it’s often not necessary • Don’t compromise the neatness of your code Avoid littering markup with unnecessary classes and IDs
Slide 11: Reward & Punishment In Practice: elliotjaystocks.com
Slide 12: Reward & Punishment In Practice: elliotjaystocks.com To reduce the need for unnecessary class names, more advanced CSS selectors were used.
Slide 13: Reward & Punishment In Practice: elliotjaystocks.com To reduce the need for unnecessary class names, more advanced CSS selectors were used. These selectors are not supported by IE6 and as a result it lacks some of the visual treats...
Slide 14: Attribute Selectors ul.blogroll li a[href="http://hicksdesign.co.uk"] { background:url(../images/hicksFavicon.ico) }
Slide 15: Attribute Selectors ul.blogroll li a[href="http://hicksdesign.co.uk"] { background:url(../images/hicksFavicon.ico) } Safari IE6
Slide 16: Adjacent Sibling Selectors ol.portfolioList li h2+a:hover { border:none }
Slide 17: Adjacent Sibling Selectors ol.portfolioList li h2+a:hover { border:none } Safari IE6
Slide 18: Reward & Punishment In Practice: stuffandnonsense.co.uk Safari IE6
Slide 19: But Why Reward or Punish?
Slide 20: But Why Reward or Punish? • Encourage users to adopt modern browsers
Slide 21: But Why Reward or Punish? • Encourage users to adopt modern browsers • Encourage browser vendors to create modern browsers
Slide 22: But Why Reward or Punish? • Encourage users to adopt modern browsers • Encourage browser vendors to create modern browsers • Push technology and ideologies forward
Slide 23: A Word of Warning
Slide 24: A Word of Warning • Not suitable in some commercial environments
Slide 25: A Word of Warning • Not suitable in some commercial environments • Pay attention to client requirements
Slide 26: A Word of Warning • Not suitable in some commercial environments • Pay attention to client requirements • Adapt to suit your target audience
Slide 27: When In Doubt...
Slide 28: When In Doubt... ... use a badge!
Slide 29: Accessibility: Catering For Users Without Resorting To Punishment
Slide 30: Accessibility: Catering For Users Without Resorting To Punishment In some circumstances, a browser’s lack of support for certain features can ruin the user experience.
Slide 31: Accessibility: Catering For Users Without Resorting To Punishment In some circumstances, a browser’s lack of support for certain features can ruin the user experience. In this instance, alternative display systems should be considered.
Slide 32: Problem: JS Tab Navigation The absolute positioning used to display the different information boxes on rollover is rendered useless if the user has Javascript disabled.
Slide 33: Solution: Specific Styles For Javascript-Disabled Users
Slide 34: Solution: Specific Styles For Javascript-Disabled Users 1. Use Javascript to write the class of hasJavascript to the <body> tag. No Javascript? No hasJavascript class!
Slide 35: Solution: Specific Styles For Javascript-Disabled Users 1. Use Javascript to write the class of hasJavascript to the <body> tag. No Javascript? No hasJavascript class! 2. Use CSS to style descendants of hasJavascript differently; e.g: body div { background:#000 } body.hasJavascript div { background:#fff }
Slide 36: Solution: Specific Styles For Javascript-Disabled Users Users without Javascript see a completely different navigation system. Hurrah!
Slide 37: Conclusion
Slide 38: Conclusion • Decide whether to reward or punish: - What are the browser’s capabilities? - Who is the target user / browser?
Slide 39: Conclusion • Decide whether to reward or punish: - What are the browser’s capabilities? - Who is the target user / browser? • Be gentle: - Proceed with caution - Consider displaying a warning ‘badge’
Slide 40: Conclusion • Decide whether to reward or punish: - What are the browser’s capabilities? - Who is the target user / browser? • Be gentle: - Proceed with caution - Consider displaying a warning ‘badge’ • Stay accessible: - Usability is more important than punishment - If necessary, offer alternative styling for different browsers
Slide 41: Thank You elliotjaystocks.com/geeknight



Add a comment on Slide 1
If you have a SlideShare account, login to comment; else you can comment as a guest- Favorites & Groups
Showing 1-50 of 2 (more)