<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Learning the World &#187; blur</title>
	<atom:link href="http://learningtheworld.eu/tag/blur/feed/" rel="self" type="application/rss+xml" />
	<link>http://learningtheworld.eu</link>
	<description></description>
	<lastBuildDate>Tue, 06 Nov 2012 00:17:33 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>More CSS Drop Shadows For All Browsers</title>
		<link>http://learningtheworld.eu/2010/ms-box-shadow/</link>
		<comments>http://learningtheworld.eu/2010/ms-box-shadow/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 16:00:18 +0000</pubDate>
		<dc:creator><![CDATA[Martin Kliehm]]></dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[blur]]></category>
		<category><![CDATA[box-shadow]]></category>
		<category><![CDATA[buttons]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[drop shadow]]></category>
		<category><![CDATA[eye-candy]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[ie8]]></category>
		<category><![CDATA[jumping-through-loops]]></category>
		<category><![CDATA[pseudo 3d]]></category>
		<category><![CDATA[shadow]]></category>
		<category><![CDATA[visual effects]]></category>

		<guid isPermaLink="false">http://learningtheworld.eu/?p=1021</guid>
		<description><![CDATA[Thanks to the unstoppable advancements of web standards aiding mankind to overcome the real burdens of the 21st century, adding drop shadows  to boxes became much easier in recent years! No more PNG background images! Leaving the question aside whether drop shadows are really progressive and appropriate for a flat medium (anybody remember the fad of “3D” bulging buttons in the 1990ies?), I&#160;was confronted with the challenge of adding box shadows in Internet Explorer for a client project.&#160;[&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Thanks to the unstoppable advancements of web standards aiding mankind to overcome the real burdens of the 21st century, adding <strong>drop shadows</strong> to boxes became much easier in recent years! No more PNG background images! Leaving the question aside whether drop shadows are really progressive and appropriate for a flat medium (anybody remember the fad of &ldquo;3D&rdquo; <a href="http://www.handson.nu/">bulging buttons</a> in the 1990ies?), I&nbsp;was confronted with the challenge of adding box shadows in Internet Explorer for a client project.</p>

<p><strong>Pro tip:</strong> communicate to the client that shadows are a <strong>bonus feature</strong>. Your designers may disagree, but the site will not suffer considerably when special effects like box shadows, text shadows, or rounded corners are regarded as enhancements for decent browsers. However, your client&rsquo;s budget will suffer when they are determined to provide the same visual effects on outdated browsers such as <acronym title="Internet Explorer 6">IE6</acronym>. That said, here is the well-known method in <acronym title="Cascading Style Sheets, 3rd Edition">CSS3</acronym>:</p>

<ol class="code" title="CSS">
<li><code><strong>.wrapper</strong> {</code></li>
<li class="indent"><code>background-color: #fff;</code></li>
<li class="indent"><code>border: 1px solid #d30d01;</code></li>
<li class="indent"><code><em>box-shadow:</em> 4px 4px 4px rgba(0, 0, 0, 0.2);</code></li>
<li class="indent"><code>float: left;</code></li>
<li class="indent"><code>height: 75px;</code></li>
<li class="indent"><code>margin: 15px;</code></li>
<li class="indent"><code>padding: 10px;</code></li>
<li class="indent"><code>width: 75px;</code></li>
<li class="indent"><code><em>-moz-box-shadow:</em> 4px 4px 4px rgba(0, 0, 0, 0.2);</code></li>
<li class="indent"><code><em>-o-box-shadow:</em> 4px 4px 4px rgba(0, 0, 0, 0.2);</code></li>
<li class="indent"><code><em>-webkit-box-shadow:</em> 4px 4px 4px rgba(0, 0, 0, 0.2);</code></li>
<li><code>}</code></li>
</ol>

<ol class="code" title="HTML code">
<li><code>&lt;div class=&quot;<em>wrapper</em>&quot;&gt;</code></li>
<li class="indent"><code>&lt;p&gt;CSS box-shadow&lt;/p&gt;</code></li>
<li><code>&lt;/div&gt;</code></li>
</ol>

<p>At the same time when we rolled out the website, Robert Nyman came to the conclusion that the proprietary Microsoft <code>filter</code> for <a href="http://robertnyman.com/2010/03/16/drop-shadow-with-css-for-all-web-browsers/"><code>Shadow</code> looks much prettier than <code>DropShadow</code></a>, so I forgot about blogging myself as his solution doesn&rsquo;t rely on unsemantic markup and is more elegant:</p>

<ol class="code" title="CSS">
<li><code><strong>.wrapper</strong> {</code></li>
<li class="indent">/* For IE 8 */</li>
<li class="indent"><code><em>-ms-filter: progid:DXImageTransform.Microsoft.Shadow</em>( Strength=5, Direction=135, Color='#999999' );</code></li>
<li class="indent">/* For IE 5.5 &#8211; 7 */</li>
<li class="indent"><code><em>filter: progid:DXImageTransform.Microsoft.Shadow</em>( Strength=5, Direction=135, Color='#999999' );</code></li>
<li><code>}</code></li>
</ol>

<p>Note that you get slightly better effects when you choose a dark gray instead of black as shadow color. If you can live with the rendering of the third box below, don&rsquo;t read any further. <img src="http://learningtheworld.eu/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" /> </p>

<p>However, applying the filter had the side effect that text inside the box wasn&rsquo;t anti-aliased in <acronym>IE</acronym> 6-8 anymore, and the shadow still didn&rsquo;t look decent enough. So we added an extra <code>span</code> and applied the <code>blur</code> filter on it.</p>

<p><img src="/wp-content/uploads/2010/08/screenshot-box-shadow.png" alt="Screenshot comparing the solutions for CSS drop shadows side by side" width="481" height="103" class="fullsize" /></p>

<p>That led to a more complex code as we needed an inner wrapper where the border and background is applied to, while the outer wrapper merely acted as a&nbsp;&hellip; wrapper, where the styles were reset to defaults. <acronym title="Hypertext Markup Language">HTML</acronym> first:</p>

<ol class="code" title="HTML code">
<li><code>&lt;div class=&quot;<em>wrapper ms-box-shadow</em>&quot;&gt;</code></li>
<li class="indent"><code><strong>&lt;div class=&quot;inner&quot;&gt;</strong></code></li>
<li class="indent double"><code>&lt;p&gt;<acronym>Internet Explorer</acronym> with blur filter&lt;/p&gt;</code></li>
<li class="indent"><code><strong>&lt;/div&gt;</strong></code></li>
<li class="indent"><code><strong>&lt;span class=&quot;shadow&quot;&gt;&lt;/span&gt;</strong></code></li>
<li><code>&lt;/div&gt;</code></li>
</ol>

<p>And here&rsquo;s the <acronym>CSS</acronym> that&rsquo;s added with Conditional Comments for <acronym>IE</acronym> 6-8 only (as <acronym>IE9</acronym> supports native <acronym>CSS</acronym> <code>box-shadow</code>, <a href="http://caniuse.com/#feat=css-boxshadow">more or less</a>). The shadow element is absolutely positioned, set behind the inner content and blown up to 100%. Not original, but it works:</p>

<ol class="code" title="CSS">
<li><code><strong>.wrapper, .inner</strong> {</code></li>
<li class="indent"><code>background-color: #fff;</code></li>
<li class="indent"><code>border: 1px solid #d30d01;</code></li>
<li class="indent"><code>height: 75px;</code></li>
<li class="indent"><code>padding: 10px;</code></li>
<li class="indent"><code><em>position: relative;</em></code></li>
<li class="indent"><code>width: 75px;</code></li>
<li><code>}</code></li>
<li><code><strong>.wrapper</strong> {</code></li>
<li class="indent"><code>float: left;</code></li>
<li class="indent"><code>margin: 15px;</code></li>
<li><code>}</code></li>
<li>/* reset wrapper styles to defaults; work-around for screwed box-model */</li>
<li><code><strong>.ms-box-shadow</strong> {</code></li>
<li class="indent"><code>background-color: transparent;</code></li>
<li class="indent"><code>border: 0 none;</code></li>
<li class="indent"><code>height: 95px;</code></li>
<li class="indent"><code>padding: 0;</code></li>
<li class="indent"><code>width: 95px;</code></li>
<li><code>}</code></li>
<li>/* Move the inner wrapper to the foreground */</li>
<li><code><strong>.inner</strong> {</code></li>
<li class="indent"><code><em>z-index: 50;</em></code></li>
<li><code>}</code></li>
<li>/* The shadow element */</li>
<li><code><strong>.shadow</strong> {</code></li>
<li class="indent"><code>background-color: #000;</code></li>
<li class="indent"><code>display: block;</code></li>
<li class="indent"><code><em>filter: progid:DXImageTransform.Microsoft.Blur</em>( makeShadow='true', pixelRadius=4, shadowOpacity=0.30 );</code></li>
<li class="indent"><code>height: 100%;</code></li>
<li class="indent"><code>left: 0;</code></li>
<li class="indent"><code><em>position: absolute;</em></code></li>
<li class="indent"><code>top: 0;</code></li>
<li class="indent"><code>width: 100%;</code></li>
<li class="indent"><code><em>z-index: 0;</em></code></li>
<li><code>}</code></li>
</ol>

<p>For some reason I got a more similar result with the <code>shadowOpacity</code> set to 30% instead of 20%.</p>

<h3>Where&rsquo;s the crux?</h3>

<p>If we are willing to ignore lots of bloated <acronym>CSS</acronym>: <strong><acronym>IE6</acronym> only blows the shadow up to 100% when the wrapper has a fixed height</strong>. This sucks, but unless you want to add more bloated code in JavaScript I don&rsquo;t know of any solution for this problem. Still <acronym>IE</acronym> 7-8 handle a value of 100% right, and there are many cases where the height is known. Take for example photos where you&#8217;d like to apply shadows, some buttons, or horizontal shades lying above images, like the <a href="http://dekabank.de/db/en/company/social-responsibility/">shadow of the second level navigation on this site</a>. Beautiful, isn&rsquo;t it?</p>
]]></content:encoded>
			<wfw:commentRss>http://learningtheworld.eu/2010/ms-box-shadow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accessible Drop-Down Menus</title>
		<link>http://learningtheworld.eu/2008/accessible-drop-down-menus/</link>
		<comments>http://learningtheworld.eu/2008/accessible-drop-down-menus/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 08:00:09 +0000</pubDate>
		<dc:creator><![CDATA[Martin Kliehm]]></dc:creator>
				<category><![CDATA[accessibility]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[ageing]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[aria]]></category>
		<category><![CDATA[arrow keys]]></category>
		<category><![CDATA[assistive technologies]]></category>
		<category><![CDATA[AT]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[blur]]></category>
		<category><![CDATA[buffer]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[DHTML]]></category>
		<category><![CDATA[drop-down]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[event delegation]]></category>
		<category><![CDATA[fly-out]]></category>
		<category><![CDATA[focus]]></category>
		<category><![CDATA[Hick's Law]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[image replacement]]></category>
		<category><![CDATA[internationalization]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[keyboard access]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[menulist]]></category>
		<category><![CDATA[multi-level menus]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[pull-down]]></category>
		<category><![CDATA[role]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[screen reader]]></category>
		<category><![CDATA[screenreader]]></category>
		<category><![CDATA[sIFR]]></category>
		<category><![CDATA[tab order]]></category>
		<category><![CDATA[text resize]]></category>
		<category><![CDATA[WCAG]]></category>
		<category><![CDATA[web 2.0]]></category>

		<guid isPermaLink="false">http://learningtheworld.eu/?p=171</guid>
		<description><![CDATA[A few days ago a co-worker asked if <strong><acronym title="Dynamic HTML">DHTML</acronym> drop-down menus pose a problem with accessibility</strong>. Since the Web Content Accessibility Guidelines 1.0 (<acronym>WCAG</acronym>) declared all JavaScript <em>evil</em> in 1999, assistive technologies (<acronym>AT</acronym>) have made significant progress. So we cannot condemn pull-down menus altogether, but there are various reasons to keep an eye on them buggers.&#160;[&#8230;]]]></description>
				<content:encoded><![CDATA[<p>A few days ago a co-worker asked if <strong><acronym title="Dynamic HTML">DHTML</acronym> drop-down menus pose a problem with accessibility</strong>. Since the Web Content Accessibility Guidelines 1.0 (<acronym>WCAG</acronym>) declared all JavaScript <em>evil</em> in 1999, assistive technologies (<acronym>AT</acronym>) have made significant progress. So we cannot condemn pull-down menus altogether, but there are various reasons to keep an eye on them buggers:</p>

<ol>
<li id="ageing"><p><strong>Older people</strong> have difficulties with drop-down and <a href="http://www.w3.org/TR/wai-age-literature/">multi-level menus</a>, because their manual dexterity, eye-hand coordination and space perception decreases. Also some move the mouse when clicking, or tremble, hence it&#8217;s more likely they slip off the menu. Hell, that happens to <em>me</em> frequently!</p>
<p>However, did you notice the Windows Start Menu is more forgiving when you slip off an item? There&#8217;s a little delay before the secondary level is hidden. Perhaps we need an event-capturing script tolerating a slip from the menu rather than the immediate reaction of the <code>mouseout</code> event.</p></li>
<li id="hicks-law"><p>Nested menus are <strong>more complex</strong>. According to <a href="http://en.wikipedia.org/wiki/Hick%27s_law">Hick&#8217;s Law</a> orientation in a multi-level menu can take longer than multiple clicks in a flat menu with good information architecture. See an <a href="http://learningtheworld.eu/2007/usability-analysis/#hicks-law">earlier article</a> for the math.</p></li>
<li id="keyboard-access"><p>The navigation must be <strong>accessible by keyboard alone</strong>. The result should be the same, whether you hover over an item or tab to it. So check for the <code>focus</code> event and <acronym title="Cascading Style Sheets">CSS</acronym> pseudo-class. Don&#8217;t forget to test backwards tabbing (<kbd>shift tab</kbd>). By the way, mobile devices have no mouse either&hellip;</p>
<p>The <strong>tab order</strong> should be consistent and logical, <abbr>i.e.</abbr> not jumping around on a page. Also the focused item should be visible, for example highlighted with the default 1px dotted border some browsers draw around it. Some people think this is ugly and remove the default border. That is a no-no.</p>
<p>And if you <em>really</em> want desktop behavior, add support for the <strong>arrow keys</strong> (<code>event.keyCode</code> 37-40). Keep in mind though that screen readers have predefined functions for the arrow keys in combination with the <kbd>ctrl</kbd>, <kbd>shift</kbd>, or <kbd>alt</kbd> keys. In JavaScript those keys can be detected with the <code>event.ctrlKey</code>, <code>event.altKey</code>, and <code>event.shiftKey</code> properties. Also <strong>crossbrowser event delegation</strong> for <code>focus</code> or <code>blur</code> events can be a bitch, thankfully <a href="http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html"><acronym title="Peter-Paul Koch">PPK</acronym> has a solution</a>.</p></li>
<li id="skip-content"><p>Users of <acronym>AT</acronym> should have means to <strong>skip content</strong>. That&#8217;s possible with semantic markup: a menu as (nested) list(s) enables them to jump to the next block. Also there should be <em>a few</em> skip links at the beginning of the code pointing to important sections on the page, such as content, navigation, or search. Mobile users also profit from that technique (try surfing eBay with Opera Mini <img src="http://learningtheworld.eu/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" />  ).</p></li>
<li id="links"><p><strong>Pages never link to themselves.</strong> When I click on a link (the menu being no exception) I expect to land on a <em>different</em> page. Therefore it&#8217;s confusing to land on the same page. This happened to me recently when I was filling out a form on my mobile phone and got the same page with an error message. It took me a while to realize where I was. It&#8217;s the same whether you have a tiny screen or a low screen resolution to see things larger when you are visually impaired: you only see a small part of the page, so it&#8217;s hard to realize when something unexpected happens.</p></li>
<li id="aria"><p>You can add some semantic sugar with the <strong><acronym title="Accessible Rich Internet Applications">ARIA</acronym> <code>role</code></strong> property. In this case <code>&lt;ul role=&quot;navigation&quot;&gt;</code> would be appropriate. I strongly encourage you to use <acronym>ARIA</acronym> as it is widely supported by browsers and screen readers, enhances a disabled user&#8217;s experience, and doesn&#8217;t break old browsers. A most <a href="http://dev.opera.com/articles/view/introduction-to-wai-aria/">recent introduction</a> has been written by Gez Lemon for the Opera Developer Community.</p></li>
<li id="buffer"><p>If a second level navigation is initially hidden with <code>display:none</code> it won&#8217;t be in the <strong>screen reader buffer</strong>. Therefore off-screen positioning is a better idea, else you need to <a href="http://juicystudio.com/article/improving-ajax-applications-for-jaws-users.php">update the buffer</a> by writing random values into a hidden <code>input</code> field.</p></li>
<li id="scaling"><p>A common problem in menus is <strong>limited horizontal space</strong>. Text should be scalable, and it must not jut-out into other page elements when it is <strong>enlarged</strong>. Even normal text can break a narrow menu when you think of internationalization. In German there are many composite words. While building a website for a competing brand I came across a menu item on the Philips website for &ldquo;male grooming.&rdquo; The German word &bdquo;<span xml:lang="de" lang="de">Körperhaarpflegesystem</span>&rdquo; is guaranteed to blow every menu! <img src="http://learningtheworld.eu/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> </p>
<p>Another common problem that prevents scaling in menus are <strong>text graphics</strong>. I know marketing just <em>loves</em> to see the corporate font in the main menu, but text in images can&#8217;t be scaled, people with visual impairments can&#8217;t change text and background colors for higher contrast, and <strong>Flash Image Replacement</strong> like sIFR still has <a href="http://virtuelvis.com/archives/2005/04/i-hate-sifr">accessibility issues</a>, is known to <a href="http://www.456bereastreet.com/archive/200712/choose_an_accessible_image_replacement_method/#comment26">distort fonts</a>, is <a href="http://www.mezzoblue.com/archives/2004/10/26/sifr/">CPU intensive and slow</a>. The bottom line is: don&#8217;t use text as images, make textual information text.</p></li>
</ol>

<p id="technical-issues">So much for accessibility. Besides there are a few <strong>technical issues</strong> to consider: mobile devices often have problems with JavaScript or with layers. Some proxies in large companies <a href="http://www.robertnyman.com/2006/04/25/an-important-lesson-learned-about-ajax-and-accessibility/">filter JavaScript</a> for security reasons, so you can&#8217;t rely on the ubiquitous availability, your script has to be unobtrusive, and you can&#8217;t rely on <code>noscript</code> either. Don&#8217;t even think of creating a menu from JavaScript arrays.</p>

<p>Moreover there&#8217;s a well-known bug in <acronym title="Internet Explorer">IE</acronym>6 responsible for showing <code>select</code> lists always in front of any layers (like your second level menu), regardless of a <code>z-index</code>. Thankfully there are plugins like <a href="http://brandonaaron.net/docs/bgiframe/">bgiframe</a> for jQuery to solve this. Multi-level menus can bloat the code, event handling can be CPU intensive (use <a href="http://icant.co.uk/sandbox/eventdelegation/">event delegation</a>). And if large amounts of menu code is at the beginning, the real content gets further behind and less relevant for search engines.</p>

<p>In <strong>conclusion</strong>, for an alleged quicker entry you pay with many disadvantages. Often drop-down menus just conceal a poorly planned information architecture. I would reconsider their usage.</p>

<p>Did I forget something? What&#8217;s your opinion on drop-down menus? Love them or hate them?</p>
]]></content:encoded>
			<wfw:commentRss>http://learningtheworld.eu/2008/accessible-drop-down-menus/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
