SlideShare une entreprise Scribd logo
1  sur  319
Télécharger pour lire hors ligne
Hello.

http://is.gd/AWD-on-Ice-2011
ADAPTIVE WEB DESIGN WORKSHOP




    The Agenda
๏   Progressive Enhancement

    ‣ vs Graceful Degradation

    ‣ How & Why It Works

๏   Content & Organization
๏   Semantics

    ‣ HTML5

    ‣ Microformats




                                   2
ADAPTIVE WEB DESIGN WORKSHOP




    The Agenda
๏   Design

    ‣ Parsing Errors

    ‣ Designing in Layers

    ‣ Adaptive Layouts

    ‣ “Mobile First”
๏   Interactivity

    ‣ Unobtrusive JavaScript
    ‣ Adaptive Interfaces

    ‣ Hijax

                                   3
ADAPTIVE WEB DESIGN WORKSHOP




    The Agenda
๏   Accessibility

    ‣ Design Considerations

    ‣ ARIA




                                   4
VillageReach.org
Progressive
Enhancement
?
Technological
 restrictions
MCMLXXVII
MCMLXXVII
  (that’s 1977)
HTML   CSS
fault tolerance
n. a system’s ability to continue to
operate when it encounters and
unexpected error.
Browsers IGNORE
 what they don’t
   understand
Graceful
Degradation
Modern
Browsers
   Older Browsers
Modern
Browsers
   Older Browsers
Progressive
Enhancement
Progressive
Graceful Degradation   Enhancement
Content
:-)
Ooooh.
Shiny!
Progressive
Enhancement
 ISN’T about
  browsers.
Browsers and
 technologies
COME AND GO
Don’t lose sight
of your USERS
User Experience




             BASIC                          ADVANCED

                     Browser Capabilities
User Experience




             BASIC                          ADVANCED

                     Browser Capabilities


                        Content
User Experience




                      Semantics
             BASIC                          ADVANCED

                     Browser Capabilities


                        Content
User Experience




                         Design

                      Semantics
             BASIC                          ADVANCED

                     Browser Capabilities


                        Content
User Experience




                     Interactivity

                         Design

                      Semantics
             BASIC                          ADVANCED

                     Browser Capabilities


                        Content
User Experience



                     Accessibility

                     Interactivity

                         Design

                      Semantics
             BASIC                          ADVANCED

                     Browser Capabilities


                        Content
User Experience



                          ARIA

                      JavaScript

                           CSS

                         HTML
             BASIC                          ADVANCED

                     Browser Capabilities


                     Text & HTTP
User Experience




             BASIC                          ADVANCED

                     Browser Capabilities


                        Content
Content
 is WHY
we build
websites
Clear,
well-written
prose is key.
Organize
 & prioritize
your content
Don’t
obscure
content.
Header

                       Nav
Features

                      Extra

                       Social
Programs
                    Newsletter



 News



           Footer
Header

Features               Nav

Programs              Extra

 News                 Social

                    Newsletter

           Footer
User Experience




                      Semantics
             BASIC                          ADVANCED

                     Browser Capabilities


                        Content
ADAPTIVE WEB DESIGN WORKSHOP




Semantics 101
 <p>HTML5 introduces several <em>really</em>
 useful elements and a ton of new APIs.</p>


 <p>Please fill out the form below.
 <strong>Note: all fields are required.</strong></p>


 <p>I like to work with markup languages because
 <strong>they are simple and easy to read</strong>.
 They also have that certain <i lang="fr" title="I
 don&#8217;t know what">je ne sais quoi</i>.</p>
ADAPTIVE WEB DESIGN WORKSHOP




Semantics 101




                               small
ADAPTIVE WEB DESIGN WORKSHOP




Semantics 101


                               hr
ADAPTIVE WEB DESIGN WORKSHOP




Organization
 <figure id="fig-1">
  <img src="photo.jpeg" alt=""/>
  <figcaption>Photo of Albert Einstein</figcaption>
 </figure>


 <figure id="fig-2">
  <table>
    <caption>2011 Forecast Earnings</caption>
    <!-- a bunch of data -->
  </table>
 </figure>
ADAPTIVE WEB DESIGN WORKSHOP




Organization
 <section>
  <!-- pretty much anything can go here -->
 </section>


 <article>
  <!-- pretty much anything can go here -->
 </article>
section
section > article
article
article > section
ADAPTIVE WEB DESIGN WORKSHOP




Organization
 <header>
  <!-- titles, etc. go here -->
 </header>


 <footer>
  <!-- meta/supplementary information goes here -->
 </footer>
header
footer
article
article > header
article
article > footer
ADAPTIVE WEB DESIGN WORKSHOP




Organization
 <nav>
  <ol>
    <li><a href="#details">Details</a></li>
    <li><a href="#lodging">Lodging</a></li>
    <li><a href="#location">Location</a></li>
    <li><a href="#topics">Topics</a></li>
    <li><a href="#contact">Contact Us</a></li>
  </ol>
  <p><a href="register">Register Now</a>
    <b>Only 5 spaces left</b></p>
 </nav>
nav
nav
ADAPTIVE WEB DESIGN WORKSHOP




Organization
 <article>

    <!-- main content -->

    <aside>
     <!-- something related -->
    </aside>

 </article>
aside
ADAPTIVE WEB DESIGN WORKSHOP




Implicit sections (HTML4)
                               <h1> HTML5
                               <p> HTML5 is currently under development...
                               <p> Like its immediate predecessors, HTML...


                               <h2> W3C standardization process
                               <p> The Web Hypertext Application...
                               <p> The HTML5 specification...
                               <p> According to the W3C timetable...
                               <p> Ian Hickson, editor of the HTML5...


                               <h2> Markup
                               <p> HTML5 introduces a number of...
                               <p> The HTML5 syntax is no longer...




                                1 HTML5
                                1.1 W3C standardization process
                                1.2 Markup
ADAPTIVE WEB DESIGN WORKSHOP




Explicit sections (HTML5)
                                    <h1> HTML5
                                    <p> HTML5 is currently under development...
                                    <p> Like its immediate predecessors, HTML...


                                    <h2> W3C standardization process
                          section


                                    <p> The Web Hypertext Application...
                                    <p> The HTML5 specification...
                                    <p> According to the W3C timetable...
                                    <p> Ian Hickson, editor of the HTML5...


                                    <h2> Markup
                          section




                                    <p> HTML5 introduces a number of...
                                    <p> The HTML5 syntax is no longer...




                                     1 HTML5
                                     1.1 W3C standardization process
                                     1.2 Markup
ADAPTIVE WEB DESIGN WORKSHOP




Explicit sections (HTML5)
                                    <h1> HTML5
                                    <p> HTML5 is currently under development...
                                    <p> Like its immediate predecessors, HTML...


                                    <h1> W3C standardization process
                          section


                                    <p> The Web Hypertext Application...
                                    <p> The HTML5 specification...
                                    <p> According to the W3C timetable...
                                    <p> Ian Hickson, editor of the HTML5...


                                    <h1> Markup
                          section




                                    <p> HTML5 introduces a number of...
                                    <p> The HTML5 syntax is no longer...




                                     1 HTML5
                                     1.1 W3C standardization process
                                     1.2 Markup
ADAPTIVE WEB DESIGN WORKSHOP




Explicit sections (HTML5)
                                    <h1> HTML5
                                    <p> HTML5 is currently under development...
                                    <p> Like its immediate predecessors, HTML...


                                    <h4> W3C standardization process
                          section


                                    <p> The Web Hypertext Application...
                                    <p> The HTML5 specification...
                                    <p> According to the W3C timetable...
                                    <p> Ian Hickson, editor of the HTML5...


                                    <h6> Markup
                          section




                                    <p> HTML5 introduces a number of...
                                    <p> The HTML5 syntax is no longer...




                                     1 HTML5
                                     1.1 W3C standardization process
                                     1.2 Markup
ADAPTIVE WEB DESIGN WORKSHOP




    Sections
๏   section
๏   article
๏   aside
๏   footer
๏   header
๏   nav




                                   87
ADAPTIVE WEB DESIGN WORKSHOP




Outline limitations in HTML4
                               <h1> Title
                               <h2> Subtitle
                               <p> Text content continues...
                               <p> Text content continues...
                               <p> Text content continues...
                               <p> Text content continues...
                               <p> Text content continues...
                               <p> Text content continues...
                               <p> Text content continues...




                                1 Title
                                1.1 Subtitle
ADAPTIVE WEB DESIGN WORKSHOP




Heading groups (HTML5)

                          hgroup
                                   <h1> Title
                                   <h2> Subtitle
                                   <p> Text content continues...
                                   <p> Text content continues...
                                   <p> Text content continues...
                                   <p> Text content continues...
                                   <p> Text content continues...
                                   <p> Text content continues...
                                   <p> Text content continues...




                                    1 Title
ADAPTIVE WEB DESIGN WORKSHOP




Aside: rooted sections
                               <h1> Title
                               <p> Text content continues...
                               <p> Text content continues...


                               <h2> Section heading
                               <p> Text content continues...
                               <blockquote>
                                 <h2> Rooted heading
                                 <p> Text content continues...
                                 <p> Text content continues...
                               <p> Text content continues...
                               <p> Text content continues...




                                1 Title
                                1.1 Section heading
ADAPTIVE WEB DESIGN WORKSHOP




    Sectioning roots
๏   body
๏   blockquote
๏   details
๏   fieldset
๏   figure
๏   td




                                   91
ADAPTIVE WEB DESIGN WORKSHOP




Dates & Times
 <input type="date" name="dob"/>
ADAPTIVE WEB DESIGN WORKSHOP




Numbers
 <input type="number" name="foo"/>




 <input type="range" min="1" max="11" name="foo"/>
ADAPTIVE WEB DESIGN WORKSHOP




Format validation
 <input type="email" …/>       <input type="url" …/>
ADAPTIVE WEB DESIGN WORKSHOP




Format validation
 <input type="text"
        pattern="d{6}w{3}"
        placeholder="6 digits followed by 3 letters"
        .../>
Ad-hoc
Semantics
ADAPTIVE WEB DESIGN WORKSHOP




Classi cation
ADAPTIVE WEB DESIGN WORKSHOP




Identi cation
ADAPTIVE WEB DESIGN WORKSHOP




Microformats
 <section class="vcard">
  <figure>
    <img class="photo" src="aaron-gustafson.jpg" alt=""/>
  </figure>
  <h1 class="fn">Aaron Gustafson</h1>
  …
  <p>Aaron … is <b class="role">Group Manager</b> of the
    <a class="org" href="http://webstandards.org">Web
    Standards Project (WaSP)</a> ….</p>
 </section>
Header
ADAPTIVE WEB DESIGN WORKSHOP




Semantics
 <div id="header">
  <a href="#donate" class="donate-link"
     title="Click here to view our donation options">Donate</a>
  <a href="http://villagereach.org/feed/" class="rss-link"
     title="View our RSS Feed">RSS Feed</a>
  <div id="site-title">
    <a href="http://villagereach.org" title="Village Reach: Home">
     <span>Village Reach</span>
    </a>
  </div>
 </div><!-- #header -->
Features




Programs




 News
ADAPTIVE WEB DESIGN WORKSHOP




Semantics
 <div class="entry-content entry">
  <!-- Features -->
  <div class="boxes three home">
    <!-- Programs -->
  </div>
  <div id="latestNews">
    <!-- Latest News -->
  </div>
 </div>
Nav
ADAPTIVE WEB DESIGN WORKSHOP




Semantics
 <div id="hybrid-search-3" class="widget search widget-search">
  <div class="widget-inside">
    <form method="get" class="search-form" id="search-form"
 action="http://villagereach.org/">
      <!--Search Form -->
    </form><!-- .search-form -->
  </div>
 </div>
 <div id="navigation">
  <div id="page-nav" class="page-nav">
    <ul class="menu sf-menu">
      <!-- Navigation -->
    </ul>
  </div>
 </div><!-- #navigation -->
Extra

   Social


Newsletter
ADAPTIVE WEB DESIGN WORKSHOP




Semantics
 <div id="text-8" class="widget widget_text widget-widget_text">
  <div class="widget-inside">
    <!-- Extra -->
  </div>
 </div>
 <div id="text-7" class="widget widget_text widget-widget_text">
  <div class="widget-inside">
    <!-- Social -->
  </div>
 </div>
 <div id="mc_signup_container">
  <!-- Newsletter -->
 </div>
Footer
ADAPTIVE WEB DESIGN WORKSHOP




Semantics
 <div id="footer-container">
  <div id="footer">
    <p class="copyright">Copyright &#169; 2011 <a class="site-link"
 href="http://villagereach.org" title="VillageReach"
 rel="home"><span>VillageReach</span></a>. - All rights
 reserved.</p>
  </div><!-- #footer -->
 </div><!-- #footer-container -->
User Experience




                         Design

                      Semantics
             BASIC                          ADVANCED

                     Browser Capabilities


                        Content
ADAPTIVE WEB DESIGN WORKSHOP




Parsing errors


                               p{
                                 color: red;
                               }
ADAPTIVE WEB DESIGN WORKSHOP




Parsing errors


                               p{
                                 color: red;
                               }
ADAPTIVE WEB DESIGN WORKSHOP




Parsing errors


                               p{
                                 color: red;
                                 font-weight: bold;
                               }
ADAPTIVE WEB DESIGN WORKSHOP




Parsing errors


                               p{
                                 color: red;
                                 font-weight: bold;
                               }
ADAPTIVE WEB DESIGN WORKSHOP




Parsing errors
 p {
   color: #ccc;
   color: rgba( 0, 0, 0, .5 );
 }
ADAPTIVE WEB DESIGN WORKSHOP




Parsing errors
 html[lang] p {
   color: #ccc;
   color: rgba( 0, 0, 0, .5 );
 }
ADAPTIVE WEB DESIGN WORKSHOP




Parsing errors
 @-moz-document url-prefix() {
   html[lang] p {
     color: #ccc;
     color: rgba( 0, 0, 0, .5 );
   }
 }
#intro {
  /* Basic Layout */
}

/* ... */

body[id=css-zen-garden] #intro {
 /* Advanced Layout */
}
#intro {
  /* Basic Layout */
}

/* ... */

[foo], #intro {
  /* Advanced Layout */
}
ADAPTIVE WEB DESIGN WORKSHOP




Parsing errors
 @import 'not-for-IE7-or-below.css' screen;

 @media screen, print, refrigerator {
   /* IE will get these rules */
 }
ADAPTIVE WEB DESIGN WORKSHOP




Organization



                               design
ADAPTIVE WEB DESIGN WORKSHOP




Organization


                               type        color


                                  layout
ADAPTIVE WEB DESIGN WORKSHOP




Organization
 /* =Typography */
 img {
   display: block;
 }

 /* =Layout */
 @media screen {
   .frame .inner {
     border: 10px solid;
   }
 }

 /* =Color */
 .frame .inner {
   background-color: rgb(227, 222, 215);
   border-color: rgb(227, 222, 215);
 }
ADAPTIVE WEB DESIGN WORKSHOP




Organization

                  type.css




                 layout.css    main.css




                  color.css
ADAPTIVE WEB DESIGN WORKSHOP




Organization
 {embed="styles/typography"}

 @media screen {
   {embed="styles/layout-screen"}
 }

 {embed="styles/color"}
                                    Example using ExpressionEngine embed tags
ADAPTIVE WEB DESIGN WORKSHOP




Organization
 {embed="styles/reset"}

 {embed="styles/typography"}

 @media screen {
   {embed="styles/layout-screen"}
 }

 @media print {
   {embed="styles/layout-print"}
 }

 {embed="styles/color"}

 {embed="styles/effects"}
                                    Example using ExpressionEngine embed tags
ADAPTIVE WEB DESIGN WORKSHOP




Monkey-patching
 <link rel="stylesheet" href="main.css"/>
 <!--[if IE 9]><link rel="stylesheet" href="ie9.css"/><![endif]-->
 <!--[if lte IE 8]><link rel="stylesheet" href="ie8.css"/><![endif]-->
 <!--[if lte IE 7]><link rel="stylesheet" href="ie7.css"/><![endif]-->
 <!--[if lte IE 6]><link rel="stylesheet" href="ie6.css"/><![endif]-->
ADAPTIVE WEB DESIGN WORKSHOP




Monkey-patching
 @-moz-document url-prefix() {

       /* GENERATED CONTENT - FF3 doesn't allow positioning */
       #extra-mile:before {
          content: '';
       }
       #extra-mile:first-of-type:before {
          content: url(extra-mile-sign.png);
       }

 }
ADAPTIVE WEB DESIGN WORKSHOP




Media Queries
ADAPTIVE WEB DESIGN WORKSHOP




@Media blocks
 @media screen {
   /* Styles for screen media only */
 }
ADAPTIVE WEB DESIGN WORKSHOP




@Media blocks+
 @media screen and (max-width:450px) {
   /* Styles for screen media when browser
      is 450px wide or below */
 }
ADAPTIVE WEB DESIGN WORKSHOP




Getting granular
 @media
   screen and (min-device-width:1024px)
          and (max-width:989px),
   screen and (max-device-width:480px),
   screen and (max-device-width:480px)
          and (orientation:landscape),
   screen and (min-device-width:481px)
          and (orientation:portrait) {
   /* Layout for narrower desktop (below 990px)
      or
      iPhone running iOS 3 (or equivalent)
      or
      iPhone running iOS 4 (or equivalent) in “landscape” view
      or
      iPad (or equivalent) in “portrait” view */
 }
ADAPTIVE WEB DESIGN WORKSHOP




Mobile First w/ media queries
 /* Universal Layout */

 @media screen {
   /* Styles for all screens */
 }

 @media screen and (min-width:481px) {
   /* Styles for all screens 480px+ width */
 }

 @media screen and (min-width:754px) {
   /* Styles for all screens 754px+ width */
 }
ADAPTIVE WEB DESIGN WORKSHOP




Mobile First w/ media queries
 #hd {
   background: url(hd-bg-small.png) repeat-x 50% 50%;
 }
 #hd .logo a {
   background: url(logo-small.png) no-repeat 50% 0;
   display: block;
   width: 240px;
   height: 109px;
   /* … */
 }
 @media screen and (min-width: 481px) {
   #hd {
     background: url(hd-bg.png) no-repeat 50% 52px;
   }
   #hd .logo a {
     background-image: url(logo.png);
     width: 342px;
     height: 155px;
   }
 }
Header

                       Nav
Features

                      Extra

                       Social
Programs
                    Newsletter



 News



           Footer
Header

                       Nav
Features

                      Extra

                       Social
Programs
                    Newsletter



 News



           Footer
User Experience




                     Interactivity

                         Design

                      Semantics
             BASIC                          ADVANCED

                     Browser Capabilities


                        Content
Photo credit: spike55151
ADAPTIVE WEB DESIGN WORKSHOP




Sins of our past
 <a href="javascript:someFunction();">some text</a>


 <a href="javascript:void(null);"
    onclick="someFunction();">some text</a>


 <a href="#" onclick="someFunction();">some text</a>
ADAPTIVE WEB DESIGN WORKSHOP




A minor improvement
 <a href="http://offsite.com"
    onclick="newWin( this.href ); return false;">
    some text</a>
Photo credit: Giando
ADAPTIVE WEB DESIGN WORKSHOP




Event listeners
 window.onload = handleExternalLinks;

 function handleExternalLinks()
 {
   var server = document.location.hostname;
   var anchors = document.getElementsByTagName("a");
   var i, href;
   for( i=0; i < anchors.length; i++ )
   {
     href = anchors[i].href;
     if ( href.indexOf("http://" + server) == -1 &&
           href.indexOf("https://" + server) == -1 )
     {
        // HREF is not a file on my server
        anchors[i].onclick = function()
        {
           newWin( this.href );
        };
     }
   }
 }
Photo credit: hebedesign
ADAPTIVE WEB DESIGN WORKSHOP




Listen and delegate
 document
   .getElementsByTagName( 'body' )[0]
     .onclick = clickDelegator;

 function clickDelegator( e )
 {
   e = ( e ) ? e : event;
   var el = e.target || e.srcElement;
   // external links
   if ( el.nodeName.toLowerCase() == 'a' &&
        el.getAttribute( 'rel' ) == 'external' )
   {
      newWin( el.href );
   }
 }
Photo credit: josh-n
ADAPTIVE WEB DESIGN WORKSHOP




Test for dependencies
 function someFunction()
 {
   if ( !document.getElementsByTagName ) return;

     // code that uses document.getElementsByTagName()

 }
ADAPTIVE WEB DESIGN WORKSHOP




Test for dependencies
 function someFunction()
 {
   if ( !document.getElementsByTagName ||
        !document.getElementById ) return;

     /* code that uses document.getElementsByTagName()
        and document.getElementById() */

 }
ADAPTIVE WEB DESIGN WORKSHOP




Test for dependencies
 function someFunction()
 {
   if ( !document.getElementsByTagName ||
        !document.getElementsByTagName('p') ) return;

     // code that requires the presence of a P element

 }
ADAPTIVE WEB DESIGN WORKSHOP




Test for dependencies
 function someFunction()
 {
   if ( !document.getElementById ||
        !document.getElementById('content') ) return;

     // code that requires the presence of #content

 }
ADAPTIVE WEB DESIGN WORKSHOP




Test for dependencies
 function someFunction()
 {
   if ( typeof( Prototype ) == 'undefined' ||
        parseFloat( Prototype.Version ) < 1.5 ) return;

     // code that uses Prototype 1.5 or higher

 }
ADAPTIVE WEB DESIGN WORKSHOP




Test for dependencies
 window.addEventListener(
    'load',
    function(){
       if ( document.getElementsByTagName &&
            document.getElementById )
       {
          someFunction();
       }
    },
    false
 );
Photo credit: ambery
Without JavaScript
With JavaScript
ADAPTIVE WEB DESIGN WORKSHOP




Anchor-include pattern
Source of blog entry page

 <a href="/archives/{entry_date format='%Y/%m/%d'}/{url_title}/
    comments/#comments"
    data-replace="/comments/{url_title}/">View comments on this
    entry and add your own</a>


 {if segment_4=="comments"}
     <section id="comments" class="focal">
     {embed="inc/.comments" url_title="{url_title}"}
     </section>
 {if:else}
     {comment_loader}
 {/if}
                                              Examples use ExpressionEngine tags
ADAPTIVE WEB DESIGN WORKSHOP




Anchor-include pattern
Source of blog entry page

 <a href="/archives/{entry_date format='%Y/%m/%d'}/{url_title}/
    comments/#comments"
    data-replace="/comments/{url_title}/">View comments on this
    entry and add your own</a>


 {if segment_4=="comments"}
     <section id="comments" class="focal">
     {embed="inc/.comments" url_title="{url_title}"}
     </section>
 {if:else}
     {comment_loader}
 {/if}
                                              Examples use ExpressionEngine tags
ADAPTIVE WEB DESIGN WORKSHOP




Anchor-include pattern
Source of /comments/{url_title} (technically /pages/comments/{url_title})

 {embed="inc/.comments" url_title="{segment_3}"}
                                                          Example uses ExpressionEngine tags
ADAPTIVE WEB DESIGN WORKSHOP




Anchor-include pattern
                                                                  https://gist.github.com/b976b67e88ffbfc9f125


 $.fn.ajaxInclude = function(){
      return this.each(function() {
           var $el               = $( this ),
                 target          = $el.data( 'target' ),
                 $targetEl       = target && $( target ) || $el,
                 methods         = [ 'append', 'replace', 'before', 'after' ],
                 ml              = methods.length,
                 method,
                 url;
           while ( ml-- ) {
                 method = methods[ ml ];
                 if ( $el.is( '[data-' + method + ']' ) ) {
                       url       = $el.data( method );
                       break;
                 }
           }
           if ( method == 'replace' ) { method += 'With'; }
           if ( url && method ) {
                 $.get( url, function( data ){
                       $el.trigger( 'ajaxInclude', [$targetEl, data] );
                       $targetEl[ method ]( data );
                 });
           }
      });
 };
ADAPTIVE WEB DESIGN WORKSHOP




Anchor-include pattern
Replace:
 <a data-replace="articles/latest/fragment"
    href="...">Latest Articles</a>


Before:
 <a data-before="articles/latest/fragment"
    href="...">Latest Articles</a>


After:
 <a data-after="articles/latest/fragment"
    href="...">Latest Articles</a>
ADAPTIVE WEB DESIGN WORKSHOP




Anchor-include pattern
 $("[data-append],[data-replace],”+
   “[data-after],[data-before]").ajaxInclude();
ADAPTIVE WEB DESIGN WORKSHOP




                               176
JavaScript
             CSS
ADAPTIVE WEB DESIGN WORKSHOP




Remember stu like this?
 <a href="foo.html"
    style="color:blue;"
    onmouseover="this.style.color='red'"
    onmouseout="this.style.color='blue'">Foo</a>
ADAPTIVE WEB DESIGN WORKSHOP




Remember stu like this?
 <a href="foo.html"
    style="color:blue;"
    onmouseover="this.style.color='red'"
    onmouseout="this.style.color='blue'">Foo</a>


 a, a:link, a:visited {
   color: blue;
 }
 a:hover {
   color: red;
 }
ADAPTIVE WEB DESIGN WORKSHOP




Isn’t this the same?
 for( i=0; i<objects.length; i++){
   objects[i].style.display = 'none';
 }
ADAPTIVE WEB DESIGN WORKSHOP




Small improvement
 for( i=0; i<objects.length; i++){
   objects[i].style.position = 'absolute';
   objects[i].style.left      = '-999em';
 }
ADAPTIVE WEB DESIGN WORKSHOP




Separation
  for( i=0; i<objects.length; i++){
    objects[i].addClassName( 'hidden' );
  }


  .hidden {
    position: absolute;
    left: -999em;
  }
ADAPTIVE WEB DESIGN WORKSHOP




    Maintenance options
๏   external style rules added to your CSS le (by hand)
๏   external CSS le added to the document (by hand)
๏   external CSS le added to the document via script
๏   embedding CSS in the document via script




                                                          182
ADAPTIVE WEB DESIGN WORKSHOP




Option 1: Add by hand
 /* =START WickedCool Script CSS (do not remove) */
 .wicked {
   color: red;
   font: bold 4em/2 "Comic Sans";
 }
 .cool {
   color: blue;
   font: bold 4em/2 "Comic Sans";
 }
 /* =END WickedCool Script CSS */
ADAPTIVE WEB DESIGN WORKSHOP




Option 2: Include by hand
  <script src="WickedCool.js"></script>
  <link rel="stylesheet" href="WickedCool.css" />
ADAPTIVE WEB DESIGN WORKSHOP




Option 2: Include by hand
  <script src="WickedCool.js"></script>
  <link rel="stylesheet" href="WickedCool.css" />


  <head>
    <!-- … -->
    <link rel="stylesheet" href="WickedCool.css" />
  </head>
  <body>
    <!-- … -->
    <script src="WickedCool.js"></script>
  </body>
ADAPTIVE WEB DESIGN WORKSHOP




Option 3: Scripted include
  function FindPath( filename )
  {
    var path = false;
    var scripts = document.getElementsByTagName( 'script' );
    for( var i=0; i<scripts.length; i++ )
    {
      if( scripts[i].getAttribute( 'src' ) &&
          scripts[i].getAttribute( 'src' )
                    .indexOf( filename ) != -1 )
      {
        path = scripts[i]
                 .getAttribute( 'src' )
                 .replace( new RegExp( filename ), '' );
        break;
      }
    }
    return path;
  }
ADAPTIVE WEB DESIGN WORKSHOP




Option 3: Scripted include
  var WickedCool = {
     jsFile:    'WickedCool.js',
     cssFile:   'WickedCool.css',
     initialize: function(){
       // determine the path
       var path = FindPath( this.jsFile );
       // add the CSS file
       var css = document.createElement( 'link' );
       css.setAttribute( 'rel', 'stylesheet' );
       css.setAttribute( 'href', path + this.cssFile );
       document.getElementsByTagName( 'head' )[0]
               .appendChild( css );
       // do the rest of the wicked cool stuff
     }
  };
ADAPTIVE WEB DESIGN WORKSHOP




Option 4: Scripted embed
  function addCSS( styles )
  {
    var el = document.createElement( 'style' );
         el.setAttribute( 'type', 'text/css' );
    if ( el.styleSheet )
    {
      el.styleSheet.cssText = styles;
    }
    else
    {
      el.appendChild( document.createTextNode( styles ) );
    }
    document.getElementsByTagName( 'head' )[0]
             .appendChild( el );
  }
ADAPTIVE WEB DESIGN WORKSHOP




Option 4: Scripted embed
  var WickedCool = {
     _css: '.wicked { color: red; ' +
           '          font: bold 4em/2 "Comic Sans"; } ' +
           '.cool { color: blue; ' +
           '        font: bold 4em/2' "Comic Sans"; }',
     initialize: function()
     {
       // add the CSS
       addCSS( this._css );
       // do the rest of the wicked cool stuff
     }
  };




                                              based on the work of Nicholas Zakas
Apply No Style
Before Its Time
ADAPTIVE WEB DESIGN WORKSHOP




How do we do that?
  .TabInterface-folder {
    /* ... */
  }


  #TabInterface .tab {
    /* ... */
  }
  #TabInterface .tab.active {
    /* ... */
  }




                                190
ADAPTIVE WEB DESIGN WORKSHOP




How do we do that?
               Tactic                Default        Activated


add “-on” to the class         .tabbed         .tabbed-on




add an activation class .auto-submit           .auto-submit.active



change the form of the
                               .replace-me     .replaced
class
ADAPTIVE WEB DESIGN WORKSHOP




Media Queries
ADAPTIVE WEB DESIGN WORKSHOP




Mobile interfaces
ADAPTIVE WEB DESIGN WORKSHOP




Swapping content
 var trigger = 659;

 // …

 function toggleDisplay()
 {
     var width = $window.width();
     if ( showing == 'old' &&
           width <= trigger )
     {
          $old_nav.replaceWith($new_nav);
          showing = 'new';
     }
     else if ( showing == 'new' &&
                width > trigger )
     {
          $new_nav.replaceWith($old_nav);
          showing = 'old';
     }
 }
ADAPTIVE WEB DESIGN WORKSHOP




Semantics
 <ul>
  <li>
    <a href="#"><img src="…" alt="" /></a>
    <span>Your new online source for information
      on our progress</span>
  </li>
  <li>
    <a href="#"><img src="…" alt="" /></a>
    <span>VillageReach Announces Mozambique
      National Expansion</span>
  </li>
  <li>
    <a href="#"><img src="…" alt="" /></a>
    <span>VillageReach's innovative approach
      for last mile communities</span>
  </li>
  …
 </ul>
ADAPTIVE WEB DESIGN WORKSHOP




Style?
 <ul style=”height: 300px;”>
  <li style=”height: 300px;” >
    <a href="#"><img src="…" alt="" /></a>
    <span>Your new online source for information
      on our progress</span>
  </li>
  <li style=”height: 300px;” >
    <a href="#"><img src="…" alt="" /></a>
    <span>VillageReach Announces Mozambique
      National Expansion</span>
  </li>
  <li style=”height: 300px;” >
    <a href="#"><img src="…" alt="" /></a>
    <span>VillageReach's innovative approach
      for last mile communities</span>
  </li>
  …
 </ul>
ADAPTIVE WEB DESIGN WORKSHOP




Style?
 <ul class="jcarousel-skin-vr" style=”height: 300px;”>
  <li style=”height: 300px;”>
    <a href="#"><img src="…" alt="" /></a>
    <span>Your new online source for information
      on our progress</span>
  </li>
  <li style=”height: 300px;”>
    <a href="#"><img src="…" alt="" /></a>
    <span>VillageReach Announces Mozambique
      National Expansion</span>
  </li>
  <li style=”height: 300px;”>
    <a href="#"><img src="…" alt="" /></a>
    <span>VillageReach's innovative approach
      for last mile communities</span>
  </li>
  …
 </ul>
ADAPTIVE WEB DESIGN WORKSHOP




Script
 <ul id="vr-carousel">
  <li>
    <a href="#"><img src="…" alt="" /></a>
    <span>Your new online source for information
      on our progress</span>
  </li>
  <li>
    <a href="#"><img src="…" alt="" /></a>
    <span>VillageReach Announces Mozambique
      National Expansion</span>
  </li>
  <li>
    <a href="#"><img src="…" alt="" /></a>
    <span>VillageReach's innovative approach
      for last mile communities</span>
  </li>
  …
 </ul>
ADAPTIVE WEB DESIGN WORKSHOP




Script
 $j('#vr-carousel').jcarousel({
  auto: 6,
  visible: 1,
  animation: 0,
  wrap: 'both',
  scroll: 1,
  initCallback: vrCarousel_initCallback,
  itemFirstInCallback: vrCarousel_itemFirstInCallback,
  itemFirstInCallback: vrCarousel_fadeIn,
  itemFirstOutCallback: vrCarousel_fadeOut
 });
ADAPTIVE WEB DESIGN WORKSHOP




Script
 function vrCarousel_initCallback( carousel, item, idx, state )
 {
   // Pause autoscrolling if the user moves
   // with the cursor over the clip.
   carousel.clip.hover(function() {
       carousel.stopAuto();
   }, function() {
       carousel.startAuto();
   });

  $j('.jcarousel-item').css('opacity', 0);
 };
ADAPTIVE WEB DESIGN WORKSHOP




Script
 function vrCarousel_initCallback( carousel, item, idx, state )
 {
   var $i = carousel.list.find(‘img’), h = 0;

    // get the max h
    $i.each(function(){
     var test = $j(this).height();
     if ( test > h ){ h = test; }
    });

    // …

    carousel.list.height(h);
    $j('.jcarousel-item').css({
     opacity: 0, height: h
    });

 };
http://flex.madebymufffin.com
User Experience



                     Accessibility

                     Interactivity

                         Design

                      Semantics
             BASIC                          ADVANCED

                     Browser Capabilities


                        Content
Accessibility
“special needs”
“special needs”
    can be
 CONTEXTUAL
ADAPTIVE WEB DESIGN WORKSHOP




What is it?
ADAPTIVE WEB DESIGN WORKSHOP




What is it?
ADAPTIVE WEB DESIGN WORKSHOP




What is it?




 <button>Tweet</button>

 <a class=”button”>Tweet</a>
ADAPTIVE WEB DESIGN WORKSHOP




What is it?




 <button>Tweet</button>

 <a class=”button”>Tweet</a>
ADAPTIVE WEB DESIGN WORKSHOP




What is it?
ADAPTIVE WEB DESIGN WORKSHOP




What is it?
ADAPTIVE WEB DESIGN WORKSHOP




What is it?




 <button>Search Mail</button>

 <div>Search Mail</div>
ADAPTIVE WEB DESIGN WORKSHOP




What is it?




 <button>Search Mail</button>

 <div>Search Mail</div>
ADAPTIVE WEB DESIGN WORKSHOP




ARIA maps the OS to the web
Semantics+
ADAPTIVE WEB DESIGN WORKSHOP




All the web’s a play…
 <section id="main" role="main">
  <!-- The primary content for the page would go here -->
 </section>
<header role="banner">
<nav role="navigation">
<form role="search">
<section role="main">
<footer role="contentinfo">
<nav role="navigation">
<nav role="navigation">
ADAPTIVE WEB DESIGN WORKSHOP




Semantic comparison
             Ad-hoc                   ARIA Role               HTML5

 #header, #top                 banner                header (kind of)


 #main, #content               main                  none


 #extra, .sidebar              complementary, note   aside


 #footer, #bottom              contentinfo           footer


 #nav                          navigation            nav


 .hentry                       article               article
ADAPTIVE WEB DESIGN WORKSHOP




These are the droids you seek
 <span role="button">OK</span>


 <div role="alert">
  <p>Something went wrong.</p>
 </div>


 <div role="alertdialog">
  <p>Something went wrong.</p>
  <img src="x.png" alt="dismiss" role="button" />
 </div>
ADAPTIVE WEB DESIGN WORKSHOP




What is it?




 <a role=”button”>Tweet</a>
    class=”button”>Tweet</a>
ADAPTIVE WEB DESIGN WORKSHOP




What is it?




 <a role=”button”>Tweet</a>
ADAPTIVE WEB DESIGN WORKSHOP




What’s happening?

                               B       B
                               (off)   (on)




 <span>
  <img src="bold-off.png" alt="bold" />
 </span>
 <span>
  <img src="bold-on.png" alt="bold" />
 </span>
ADAPTIVE WEB DESIGN WORKSHOP




What’s happening?

                               B       B
                               (off)   (on)




 <span>
  <img src="bold-off.png" alt="not bold" />
 </span>
 <span>
  <img src="bold-on.png" alt="bold" />
 </span>
ADAPTIVE WEB DESIGN WORKSHOP




What’s happening?

                               B       B
                               (off)   (on)




 <span role="button" aria-pressed="false">
  <img src="bold-off.png" alt="not bold" />
 </span>
 <span role="button" aria-pressed="true">
  <img src="bold-on.png" alt="bold" />
 </span>
ADAPTIVE WEB DESIGN WORKSHOP




Complex interfaces
ADAPTIVE WEB DESIGN WORKSHOP




Traditional approach
 <h1>Pumpkin Pie</h1>
 <div class="container">
  <div class="section">
    <h2>Overview</h2>
    <img src="pie.jpg" alt="">
    <p>Whether you're hosting a festive party or a casual
    get-together with friends, our Pumpkin Pie will make
    entertaining easy!</p>
    <!-- ... -->
  </div>
  <!-- ... -->
  <ul class="tabs">
    <li><a href="#">Overview</a></li>
    <li><a href="#">Ingredients</a></li>
    <li><a href="#">Directions</a></li>
    <li><a href="#">Nutrition</a></li>
  </ul>
 </div>
ADAPTIVE WEB DESIGN WORKSHOP




Cleaner approach
 <h1>Pumpkin Pie</h1>
 <div class="tabbed">
  <h2>Overview</h2>
  <img src="pie.jpg" alt="" />
  <p>Whether you're hosting a festive party or a casual
  get-together with friends, our Pumpkin Pie will make
  entertaining easy!</p>
  <!-- ... -->
  <h2>Ingredients</h2>
  <ul>
    <li>1 (9<abbr title="inch">in</abbr>) unbaked deep
       dish pie crust</li>
    <li>½ cup white sugar</li>
    <!-- ... -->
  </ul>
  <h2>Directions</h2>
  <!-- ... -->
 </div>
ADAPTIVE WEB DESIGN WORKSHOP




Cleaner approach
 <h1>Pumpkin Pie</h1>
 <div class="tabbed">
  <h2>Overview</h2>
  <img src="pie.jpg" alt="" />
  <p>Whether you're hosting a festive party or a casual
  get-together with friends, our Pumpkin Pie will make
  entertaining easy!</p>
  <!-- ... -->
  <h2>Ingredients</h2>
  <ul>
    <li>1 (9<abbr title="inch">in</abbr>) unbaked deep
       dish pie crust</li>
    <li>½ cup white sugar</li>
    <!-- ... -->
  </ul>
  <h2>Directions</h2>
  <!-- ... -->
 </div>
ADAPTIVE WEB DESIGN WORKSHOP




No JS, basic CSS
ADAPTIVE WEB DESIGN WORKSHOP




Widget logic


                               Page
ADAPTIVE WEB DESIGN WORKSHOP




Widget logic


                               Page




                               JS?
ADAPTIVE WEB DESIGN WORKSHOP




Widget logic


                               Page




                               JS?    No
ADAPTIVE WEB DESIGN WORKSHOP




Widget logic



               Split                 Page
          the content &
           make some
               tabs


                                     JS?
                               Yes          No
ADAPTIVE WEB DESIGN WORKSHOP




On DOM ready
 <h1>Pumpkin Pie</h1>
 <div class="tabbed-on">
  <section>
    <h2>Overview</h2>
    <img src="pie.jpg" alt="">
    <p>Whether you're hosting a festive party or a casual
    get-together with friends, our Pumpkin Pie will make
    entertaining easy!</p>
    <!-- ... -->
  </section>
  <!-- ... -->
  <ul class="tabs">
    <li><a href="#">Overview</a></li>
    <li><a href="#">Ingredients</a></li>
    <li><a href="#">Directions</a></li>
    <li><a href="#">Nutrition</a></li>
  </ul>
 </div>
ADAPTIVE WEB DESIGN WORKSHOP




Adding ARIA
                               role="tablist"




                                                246
ADAPTIVE WEB DESIGN WORKSHOP




Adding ARIA




               role="tab"
               aria-selected="true"
               aria-controls="folder-1"
ADAPTIVE WEB DESIGN WORKSHOP




Adding ARIA                    role="tab"
                               aria-selected="false"
                               aria-controls="folder-4"
ADAPTIVE WEB DESIGN WORKSHOP




Adding ARIA




                               role="tabpanel"
                               aria-hidden="false"
                               aria-labelledby="folder-1-tab"
ADAPTIVE WEB DESIGN WORKSHOP




Adding ARIA




                               role="application"
                               aria-activedescendant="folder-1"
ADAPTIVE WEB DESIGN WORKSHOP




Result!
Photo credit: emilio labrador
ADAPTIVE WEB DESIGN WORKSHOP




Typical hiding schemes
                                                             Accessibility
 CSS Rules                     Display E ect
                                                             E ect
 visibility: hidden;           Element is hidden from        Content is ignored by screen
                               view, but is not removed      readers
                               from the normal ow (i.e. it
                               still takes up the space it
                               normally would)

 display: none;                Element is removed from       Content is ignored by screen
                               the normal ow and hidden;     readers
                               the space it occupied is
                               collapsed

 height: 0;                    Element is collapsed and      Content is ignored by screen
 width: 0;                     contents are hidden           readers
 overflow: hidden;
ADAPTIVE WEB DESIGN WORKSHOP




Typical hiding schemes
                                                             Accessibility
 CSS Rules                     Display E ect
                                                             E ect
 text-indent: -999em;          Contents are shifted o -      Screen readers have access
                               screen and hidden from        to the content, but the
                               view, but links may “focus”   content is limited to text and
                               oddly and negative indent     inline elements
                               may not prove long enough
                               to fully hide content


 position: absolute;           Content is removed from       Screen readers have access
 left: -999em;                 the normal ow and shifted     to the content
                               o the left-hand edge; the
                               space it occupied is
                               collapsed
ADAPTIVE WEB DESIGN WORKSHOP




Typical hiding schemes
                                                             Accessibility
 CSS Rules                     Display E ect
                                                             E ect
 position: absolute;           Content is positioned         Screen readers have access
 /* IE6, IE7 */                absolutely (and is removed    to the content
 clip: rect(
   1px 1px 1px 1px             from the normal ow), but
       );                      remains in place and is
 /* W3C */                     clipped to become invisible
 clip: rect(
   1px, 1px, 1px, 1px
       );
 padding: 0;
 border: 0;
 height: 1px;
 width: 1px;
 overflow: hidden;
ADAPTIVE WEB DESIGN WORKSHOP




Typical hiding schemes
                                                             Accessibility
 CSS Rules                     Display E ect
                                                             E ect
 visibility: hidden;           Element is hidden from        Content is ignored by screen
                               view, but is not removed      readers
                               from the normal ow (i.e. it
                               still takes up the space it
                               normally would)

 display: none;                Element is removed from       Content is ignored by screen
                               the normal ow and hidden;     readers
                               the space it occupied is
                               collapsed

 height: 0;                    Element is collapsed and      Content is ignored by screen
 width: 0;                     contents are hidden           readers
 overflow: hidden;
ADAPTIVE WEB DESIGN WORKSHOP




“Fixing” libraries
 (function(){
   var $button = $('#myButton'),
       $text = $('#myText'),
       visible = true;
   $button.click(function(){
    if ( visible ) {
      $text.slideUp('fast');
    } else {
      $text.slideDown('fast');
    }
    visible = ! visible;
   });
 })();
ADAPTIVE WEB DESIGN WORKSHOP




“Fixing” libraries
 (function(){
   var $button = $('#myButton'),
       $text = $('#myText'),
       visible = true;
   $button.click(function(){
    if ( visible ) {
      $text.slideUp('fast',function(){
         $text.addClass('accessibly-hidden')
             .slideDown(0);
       });
    } else {
      $text.slideUp(0,function(){
         $text.removeClass('accessibly-hidden')
             .slideDown('fast');
       });
    }
    visible = ! visible;
   });
 })();
photo by cfpg
ADAPTIVE WEB DESIGN WORKSHOP




Managing focus
 <div tabindex="0">
  <p>This <code>div</code> can now receive focus using a
 keyboard’s <kbd>tab</kbd> key. How cool is that?</p>
 </div>

 <div tabindex="-1">
  <p>This <code>div</code> won’t be focused by a user via the
 <kbd>tab</kbd> key, but JavaScript can <code>focus()</code> it.
 Nifty, huh?</p>
 </div>
ADAPTIVE WEB DESIGN WORKSHOP




Hey! Over here!
ADAPTIVE WEB DESIGN WORKSHOP




Hey! Over here!




 <input class="tweet-counter" value="140" disabled="disabled">
ADAPTIVE WEB DESIGN WORKSHOP




Hey! Over here!




 <span id="chars_left_notice" class="numeric">
  <strong id="status-field-char-counter"
        class="char-counter">140</strong>
 </span>
ADAPTIVE WEB DESIGN WORKSHOP




Hey! Over here!




 <span class="tweet-counter">140
  <b class="hidden"> characters remaining</b></span>


 .hidden {
   position: absolute;
   left: −999em;
 }
ADAPTIVE WEB DESIGN WORKSHOP




Hey! Over here!




 <span class="tweet-counter">maximum of 140 characters</span>



 <span class="tweet-counter">140
  <b class="hidden"> characters remaining</b></span>
ADAPTIVE WEB DESIGN WORKSHOP




Hey! Over here!




 <span aria-live="polite" aria-atomic="true"
       class="tweet-counter">140<b class="hidden">
       characters remaining</b></span>
ADAPTIVE WEB DESIGN WORKSHOP




Hey! Over here!
Header
ADAPTIVE WEB DESIGN WORKSHOP




ARIA Roles
 <div id="header">
  <a href="#donate" class="donate-link"
     title="Click here to view our donation options">Donate</a>
  <a href="http://villagereach.org/feed/" class="rss-link"
     title="View our RSS Feed">RSS Feed</a>
  <div id="site-title">
    <a href="http://villagereach.org" title="Village Reach: Home">
     <span>Village Reach</span>
    </a>
  </div>
 </div><!-- #header -->
Features




Programs




 News
ADAPTIVE WEB DESIGN WORKSHOP




ARIA Roles
 <div class="entry-content entry">
  <!-- Features -->
  <div class="boxes three home">
    <!-- Programs -->
  </div>
  <div id="latestNews">
    <!-- Latest News -->
  </div>
 </div>
Nav
ADAPTIVE WEB DESIGN WORKSHOP




ARIA Roles
 <div id="hybrid-search-3" class="widget search widget-search">
  <div class="widget-inside">
    <form method="get" class="search-form" id="search-form"
 action="http://villagereach.org/">
      <!--Search Form -->
    </form><!-- .search-form -->
  </div>
 </div>
 <div id="navigation">
  <div id="page-nav" class="page-nav">
    <ul class="menu sf-menu">
      <!-- Navigation -->
    </ul>
  </div>
 </div><!-- #navigation -->
Extra

   Social


Newsletter
ADAPTIVE WEB DESIGN WORKSHOP




ARIA Roles
 <div id="text-8" class="widget widget_text widget-widget_text">
  <div class="widget-inside">
    <!-- Extra -->
  </div>
 </div>
 <div id="text-7" class="widget widget_text widget-widget_text">
  <div class="widget-inside">
    <!-- Social -->
  </div>
 </div>
 <div id="mc_signup_container">
  <!-- Newsletter -->
 </div>
Footer
ADAPTIVE WEB DESIGN WORKSHOP




ARIA Roles
 <div id="footer-container">
  <div id="footer">
    <p class="copyright">Copyright &#169; 2011 <a class="site-link"
 href="http://villagereach.org" title="VillageReach"
 rel="home"><span>VillageReach</span></a>. - All rights
 reserved.</p>
  </div><!-- #footer -->
 </div><!-- #footer-container -->
ADAPTIVE WEB DESIGN WORKSHOP




ARIA Roles & States
 <div class="jcarousel-container jcarousel-container-horizontal"
      style="display: block; ">
  <ul id="vr-carousel">
  <li>
    <a href="#"><img src="…" alt="" /></a>
    <span>Your new online source for information
     on our progress</span>
  </li>
  <li>
    <a href="#"><img src="…" alt="" /></a>
    <span>VillageReach Announces Mozambique
     National Expansion</span>
  </li>
  …
  </ul>
 </div>
ADAPTIVE WEB DESIGN WORKSHOP




ARIA Roles & States
 <div id="jcarousel-control">
  <div class="jcarousel-prev jcarousel-prev-horizontal"
        style="display: block; " disabled="false"></div>
  <span id="jcarousel-control-caption">
    VillageReach Announces Mozambique National Expansion
  </span>
  <div class="jcarousel-next jcarousel-next-horizontal"
        style="display: block; " disabled="false"></div>
 </div>
Adaptive Web Design
    Workshop
          by Aaron Gustafson



            More of the same:
     http://adaptivewebdesign.info
         http://easy-designs.net
      http://blog.easy-designs.net
      http://aaron-gustafson.com



             Slides available at
  http://slideshare.net/AaronGustafson



 © Aaron Gustafson. All Rights Reserved.

Contenu connexe

Tendances

Wordcamp Thessaloniki 2011 The Nextweb
Wordcamp Thessaloniki 2011 The NextwebWordcamp Thessaloniki 2011 The Nextweb
Wordcamp Thessaloniki 2011 The Nextweb
George Kanellopoulos
 
4Ward Company Presentation
4Ward Company Presentation4Ward Company Presentation
4Ward Company Presentation
4Ward
 
WebSphere Portal Technical Overview
WebSphere Portal Technical OverviewWebSphere Portal Technical Overview
WebSphere Portal Technical Overview
Vincent Perrin
 
01 web sphere portal business overview
01 web sphere portal business overview01 web sphere portal business overview
01 web sphere portal business overview
ygolani
 

Tendances (20)

Wordcamp Thessaloniki 2011 The Nextweb
Wordcamp Thessaloniki 2011 The NextwebWordcamp Thessaloniki 2011 The Nextweb
Wordcamp Thessaloniki 2011 The Nextweb
 
Word camp nextweb
Word camp nextwebWord camp nextweb
Word camp nextweb
 
Integrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere PortalIntegrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere Portal
 
4Ward Company Presentation
4Ward Company Presentation4Ward Company Presentation
4Ward Company Presentation
 
Web Apps atop a Content Repository
Web Apps atop a Content RepositoryWeb Apps atop a Content Repository
Web Apps atop a Content Repository
 
IBM Portal Web intro
IBM Portal Web introIBM Portal Web intro
IBM Portal Web intro
 
WebSphere Portal Business Overview
WebSphere Portal Business OverviewWebSphere Portal Business Overview
WebSphere Portal Business Overview
 
About 4Ward
About 4WardAbout 4Ward
About 4Ward
 
JavaOne 2010 Keynote
JavaOne 2010 Keynote JavaOne 2010 Keynote
JavaOne 2010 Keynote
 
DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)
 
IBM WebSphere Portal
IBM WebSphere PortalIBM WebSphere Portal
IBM WebSphere Portal
 
Station Four: Web Redesign Presentation
Station Four: Web Redesign PresentationStation Four: Web Redesign Presentation
Station Four: Web Redesign Presentation
 
Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...
Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...
Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...
 
Integrating IBM Web Sphere Portal With Web Analytic Hosted And Non Hosted Sit...
Integrating IBM Web Sphere Portal With Web Analytic Hosted And Non Hosted Sit...Integrating IBM Web Sphere Portal With Web Analytic Hosted And Non Hosted Sit...
Integrating IBM Web Sphere Portal With Web Analytic Hosted And Non Hosted Sit...
 
Web Sphere Portal
Web Sphere PortalWeb Sphere Portal
Web Sphere Portal
 
Websphere Portal
Websphere PortalWebsphere Portal
Websphere Portal
 
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
 
WebSphere Portal Technical Overview
WebSphere Portal Technical OverviewWebSphere Portal Technical Overview
WebSphere Portal Technical Overview
 
01 web sphere portal business overview
01 web sphere portal business overview01 web sphere portal business overview
01 web sphere portal business overview
 
Fundamental Progressive Enhancement [Web Builder 2.0 - 2008]
Fundamental Progressive Enhancement [Web Builder 2.0 - 2008]Fundamental Progressive Enhancement [Web Builder 2.0 - 2008]
Fundamental Progressive Enhancement [Web Builder 2.0 - 2008]
 

Similaire à Adaptive Web Design Workshop [Iceweb 2011]

WHAT IS HTML5? (at CSS Nite Osaka)
WHAT IS HTML5? (at CSS Nite Osaka)WHAT IS HTML5? (at CSS Nite Osaka)
WHAT IS HTML5? (at CSS Nite Osaka)
Shumpei Shiraishi
 
WordCamp Thessaloniki2011 The NextWeb
WordCamp Thessaloniki2011 The NextWebWordCamp Thessaloniki2011 The NextWeb
WordCamp Thessaloniki2011 The NextWeb
George Kanellopoulos
 
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIsHTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
Gustaf Nilsson Kotte
 

Similaire à Adaptive Web Design Workshop [Iceweb 2011] (20)

HTML5 & CSS3 Workshop [FoWD NYC 2011]
HTML5 & CSS3 Workshop [FoWD NYC 2011]HTML5 & CSS3 Workshop [FoWD NYC 2011]
HTML5 & CSS3 Workshop [FoWD NYC 2011]
 
WHAT IS HTML5? (at CSS Nite Osaka)
WHAT IS HTML5? (at CSS Nite Osaka)WHAT IS HTML5? (at CSS Nite Osaka)
WHAT IS HTML5? (at CSS Nite Osaka)
 
WordCamp Thessaloniki2011 The NextWeb
WordCamp Thessaloniki2011 The NextWebWordCamp Thessaloniki2011 The NextWeb
WordCamp Thessaloniki2011 The NextWeb
 
Word camp nextweb
Word camp nextwebWord camp nextweb
Word camp nextweb
 
WHAT IS HTML5?(20100510)
WHAT IS HTML5?(20100510)WHAT IS HTML5?(20100510)
WHAT IS HTML5?(20100510)
 
Progressive EEnhancement [EECI 2011]
Progressive EEnhancement [EECI 2011]Progressive EEnhancement [EECI 2011]
Progressive EEnhancement [EECI 2011]
 
Crafting Rich Experiences with Progressive Enhancement [WebVisions 2011]
Crafting Rich Experiences with Progressive Enhancement [WebVisions 2011]Crafting Rich Experiences with Progressive Enhancement [WebVisions 2011]
Crafting Rich Experiences with Progressive Enhancement [WebVisions 2011]
 
What is HTML5
What is HTML5What is HTML5
What is HTML5
 
HTML5 Smart Markup for Smarter Websites [FoWD NYC 2011]
HTML5 Smart Markup for Smarter Websites [FoWD NYC 2011]HTML5 Smart Markup for Smarter Websites [FoWD NYC 2011]
HTML5 Smart Markup for Smarter Websites [FoWD NYC 2011]
 
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIsHTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
 
qooxdoo - Open Source Ajax Framework
qooxdoo - Open Source Ajax Frameworkqooxdoo - Open Source Ajax Framework
qooxdoo - Open Source Ajax Framework
 
Crafting Rich Experiences with Progressive Enhancement [Beyond Tellerrand 2011]
Crafting Rich Experiences with Progressive Enhancement [Beyond Tellerrand 2011]Crafting Rich Experiences with Progressive Enhancement [Beyond Tellerrand 2011]
Crafting Rich Experiences with Progressive Enhancement [Beyond Tellerrand 2011]
 
soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5
 
HTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersHTML5 Intoduction for Web Developers
HTML5 Intoduction for Web Developers
 
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
 
Summit Australia 2019 - PowerApp Portals - Andrew Ly & Lachlan Wright
Summit Australia 2019 - PowerApp Portals - Andrew Ly & Lachlan WrightSummit Australia 2019 - PowerApp Portals - Andrew Ly & Lachlan Wright
Summit Australia 2019 - PowerApp Portals - Andrew Ly & Lachlan Wright
 
No Feature Solutions with SharePoint
No Feature Solutions with SharePointNo Feature Solutions with SharePoint
No Feature Solutions with SharePoint
 
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
 
전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)
 
web designing course bangalore
web designing course bangaloreweb designing course bangalore
web designing course bangalore
 

Plus de Aaron Gustafson

Plus de Aaron Gustafson (20)

Delivering Critical Information and Services [JavaScript & Friends 2021]
Delivering Critical Information and Services [JavaScript & Friends 2021]Delivering Critical Information and Services [JavaScript & Friends 2021]
Delivering Critical Information and Services [JavaScript & Friends 2021]
 
Adapting to Reality [Guest Lecture, March 2021]
Adapting to Reality [Guest Lecture, March 2021]Adapting to Reality [Guest Lecture, March 2021]
Adapting to Reality [Guest Lecture, March 2021]
 
Designing the Conversation [Beyond Tellerrand 2019]
Designing the Conversation [Beyond Tellerrand 2019]Designing the Conversation [Beyond Tellerrand 2019]
Designing the Conversation [Beyond Tellerrand 2019]
 
Getting Started with Progressive Web Apps [Beyond Tellerrand 2019]
Getting Started with Progressive Web Apps [Beyond Tellerrand 2019]Getting Started with Progressive Web Apps [Beyond Tellerrand 2019]
Getting Started with Progressive Web Apps [Beyond Tellerrand 2019]
 
Progressive Web Apps: Where Do I Begin?
Progressive Web Apps: Where Do I Begin?Progressive Web Apps: Where Do I Begin?
Progressive Web Apps: Where Do I Begin?
 
Media in the Age of PWAs [ImageCon 2019]
Media in the Age of PWAs [ImageCon 2019]Media in the Age of PWAs [ImageCon 2019]
Media in the Age of PWAs [ImageCon 2019]
 
Adapting to Reality [Starbucks Lunch & Learn]
Adapting to Reality [Starbucks Lunch & Learn]Adapting to Reality [Starbucks Lunch & Learn]
Adapting to Reality [Starbucks Lunch & Learn]
 
Conversational Semantics for the Web [CascadiaJS 2018]
Conversational Semantics for the Web [CascadiaJS 2018]Conversational Semantics for the Web [CascadiaJS 2018]
Conversational Semantics for the Web [CascadiaJS 2018]
 
Better Performance === Greater Accessibility [Inclusive Design 24 2018]
Better Performance === Greater Accessibility [Inclusive Design 24 2018]Better Performance === Greater Accessibility [Inclusive Design 24 2018]
Better Performance === Greater Accessibility [Inclusive Design 24 2018]
 
PWA: Where Do I Begin? [Microsoft Ignite 2018]
PWA: Where Do I Begin? [Microsoft Ignite 2018]PWA: Where Do I Begin? [Microsoft Ignite 2018]
PWA: Where Do I Begin? [Microsoft Ignite 2018]
 
Designing the Conversation [Concatenate 2018]
Designing the Conversation [Concatenate 2018]Designing the Conversation [Concatenate 2018]
Designing the Conversation [Concatenate 2018]
 
Designing the Conversation [Accessibility DC 2018]
Designing the Conversation [Accessibility DC 2018]Designing the Conversation [Accessibility DC 2018]
Designing the Conversation [Accessibility DC 2018]
 
Performance as User Experience [AEADC 2018]
Performance as User Experience [AEADC 2018]Performance as User Experience [AEADC 2018]
Performance as User Experience [AEADC 2018]
 
The Web Should Just Work for Everyone
The Web Should Just Work for EveryoneThe Web Should Just Work for Everyone
The Web Should Just Work for Everyone
 
Performance as User Experience [AEA SEA 2018]
Performance as User Experience [AEA SEA 2018]Performance as User Experience [AEA SEA 2018]
Performance as User Experience [AEA SEA 2018]
 
Performance as User Experience [An Event Apart Denver 2017]
Performance as User Experience [An Event Apart Denver 2017]Performance as User Experience [An Event Apart Denver 2017]
Performance as User Experience [An Event Apart Denver 2017]
 
Advanced Design Methods 1, Day 2
Advanced Design Methods 1, Day 2Advanced Design Methods 1, Day 2
Advanced Design Methods 1, Day 2
 
Advanced Design Methods 1, Day 1
Advanced Design Methods 1, Day 1Advanced Design Methods 1, Day 1
Advanced Design Methods 1, Day 1
 
Designing the Conversation [Paris Web 2017]
Designing the Conversation [Paris Web 2017]Designing the Conversation [Paris Web 2017]
Designing the Conversation [Paris Web 2017]
 
Exploring Adaptive Interfaces [Generate 2017]
Exploring Adaptive Interfaces [Generate 2017]Exploring Adaptive Interfaces [Generate 2017]
Exploring Adaptive Interfaces [Generate 2017]
 

Dernier

Dernier (20)

Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 

Adaptive Web Design Workshop [Iceweb 2011]

  • 2. ADAPTIVE WEB DESIGN WORKSHOP The Agenda ๏ Progressive Enhancement ‣ vs Graceful Degradation ‣ How & Why It Works ๏ Content & Organization ๏ Semantics ‣ HTML5 ‣ Microformats 2
  • 3. ADAPTIVE WEB DESIGN WORKSHOP The Agenda ๏ Design ‣ Parsing Errors ‣ Designing in Layers ‣ Adaptive Layouts ‣ “Mobile First” ๏ Interactivity ‣ Unobtrusive JavaScript ‣ Adaptive Interfaces ‣ Hijax 3
  • 4. ADAPTIVE WEB DESIGN WORKSHOP The Agenda ๏ Accessibility ‣ Design Considerations ‣ ARIA 4
  • 5.
  • 8. ?
  • 10.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. HTML CSS
  • 20. fault tolerance n. a system’s ability to continue to operate when it encounters and unexpected error.
  • 21.
  • 22.
  • 23.
  • 24. Browsers IGNORE what they don’t understand
  • 26. Modern Browsers Older Browsers
  • 27. Modern Browsers Older Browsers
  • 31.
  • 32.
  • 33.
  • 34. :-)
  • 35.
  • 39. Don’t lose sight of your USERS
  • 40. User Experience BASIC ADVANCED Browser Capabilities
  • 41. User Experience BASIC ADVANCED Browser Capabilities Content
  • 42. User Experience Semantics BASIC ADVANCED Browser Capabilities Content
  • 43. User Experience Design Semantics BASIC ADVANCED Browser Capabilities Content
  • 44. User Experience Interactivity Design Semantics BASIC ADVANCED Browser Capabilities Content
  • 45. User Experience Accessibility Interactivity Design Semantics BASIC ADVANCED Browser Capabilities Content
  • 46. User Experience ARIA JavaScript CSS HTML BASIC ADVANCED Browser Capabilities Text & HTTP
  • 47. User Experience BASIC ADVANCED Browser Capabilities Content
  • 48. Content is WHY we build websites
  • 52.
  • 53.
  • 54. Header Nav Features Extra Social Programs Newsletter News Footer
  • 55. Header Features Nav Programs Extra News Social Newsletter Footer
  • 56. User Experience Semantics BASIC ADVANCED Browser Capabilities Content
  • 57.
  • 58. ADAPTIVE WEB DESIGN WORKSHOP Semantics 101 <p>HTML5 introduces several <em>really</em> useful elements and a ton of new APIs.</p> <p>Please fill out the form below. <strong>Note: all fields are required.</strong></p> <p>I like to work with markup languages because <strong>they are simple and easy to read</strong>. They also have that certain <i lang="fr" title="I don&#8217;t know what">je ne sais quoi</i>.</p>
  • 59. ADAPTIVE WEB DESIGN WORKSHOP Semantics 101 small
  • 60. ADAPTIVE WEB DESIGN WORKSHOP Semantics 101 hr
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69. ADAPTIVE WEB DESIGN WORKSHOP Organization <figure id="fig-1"> <img src="photo.jpeg" alt=""/> <figcaption>Photo of Albert Einstein</figcaption> </figure> <figure id="fig-2"> <table> <caption>2011 Forecast Earnings</caption> <!-- a bunch of data --> </table> </figure>
  • 70. ADAPTIVE WEB DESIGN WORKSHOP Organization <section> <!-- pretty much anything can go here --> </section> <article> <!-- pretty much anything can go here --> </article>
  • 71.
  • 74.
  • 77. ADAPTIVE WEB DESIGN WORKSHOP Organization <header> <!-- titles, etc. go here --> </header> <footer> <!-- meta/supplementary information goes here --> </footer>
  • 78.
  • 80.
  • 86. ADAPTIVE WEB DESIGN WORKSHOP Organization <nav> <ol> <li><a href="#details">Details</a></li> <li><a href="#lodging">Lodging</a></li> <li><a href="#location">Location</a></li> <li><a href="#topics">Topics</a></li> <li><a href="#contact">Contact Us</a></li> </ol> <p><a href="register">Register Now</a> <b>Only 5 spaces left</b></p> </nav>
  • 87.
  • 88. nav
  • 89.
  • 90. nav
  • 91. ADAPTIVE WEB DESIGN WORKSHOP Organization <article> <!-- main content --> <aside> <!-- something related --> </aside> </article>
  • 92.
  • 93. aside
  • 94.
  • 95. ADAPTIVE WEB DESIGN WORKSHOP Implicit sections (HTML4) <h1> HTML5 <p> HTML5 is currently under development... <p> Like its immediate predecessors, HTML... <h2> W3C standardization process <p> The Web Hypertext Application... <p> The HTML5 specification... <p> According to the W3C timetable... <p> Ian Hickson, editor of the HTML5... <h2> Markup <p> HTML5 introduces a number of... <p> The HTML5 syntax is no longer... 1 HTML5 1.1 W3C standardization process 1.2 Markup
  • 96. ADAPTIVE WEB DESIGN WORKSHOP Explicit sections (HTML5) <h1> HTML5 <p> HTML5 is currently under development... <p> Like its immediate predecessors, HTML... <h2> W3C standardization process section <p> The Web Hypertext Application... <p> The HTML5 specification... <p> According to the W3C timetable... <p> Ian Hickson, editor of the HTML5... <h2> Markup section <p> HTML5 introduces a number of... <p> The HTML5 syntax is no longer... 1 HTML5 1.1 W3C standardization process 1.2 Markup
  • 97. ADAPTIVE WEB DESIGN WORKSHOP Explicit sections (HTML5) <h1> HTML5 <p> HTML5 is currently under development... <p> Like its immediate predecessors, HTML... <h1> W3C standardization process section <p> The Web Hypertext Application... <p> The HTML5 specification... <p> According to the W3C timetable... <p> Ian Hickson, editor of the HTML5... <h1> Markup section <p> HTML5 introduces a number of... <p> The HTML5 syntax is no longer... 1 HTML5 1.1 W3C standardization process 1.2 Markup
  • 98. ADAPTIVE WEB DESIGN WORKSHOP Explicit sections (HTML5) <h1> HTML5 <p> HTML5 is currently under development... <p> Like its immediate predecessors, HTML... <h4> W3C standardization process section <p> The Web Hypertext Application... <p> The HTML5 specification... <p> According to the W3C timetable... <p> Ian Hickson, editor of the HTML5... <h6> Markup section <p> HTML5 introduces a number of... <p> The HTML5 syntax is no longer... 1 HTML5 1.1 W3C standardization process 1.2 Markup
  • 99. ADAPTIVE WEB DESIGN WORKSHOP Sections ๏ section ๏ article ๏ aside ๏ footer ๏ header ๏ nav 87
  • 100. ADAPTIVE WEB DESIGN WORKSHOP Outline limitations in HTML4 <h1> Title <h2> Subtitle <p> Text content continues... <p> Text content continues... <p> Text content continues... <p> Text content continues... <p> Text content continues... <p> Text content continues... <p> Text content continues... 1 Title 1.1 Subtitle
  • 101. ADAPTIVE WEB DESIGN WORKSHOP Heading groups (HTML5) hgroup <h1> Title <h2> Subtitle <p> Text content continues... <p> Text content continues... <p> Text content continues... <p> Text content continues... <p> Text content continues... <p> Text content continues... <p> Text content continues... 1 Title
  • 102. ADAPTIVE WEB DESIGN WORKSHOP Aside: rooted sections <h1> Title <p> Text content continues... <p> Text content continues... <h2> Section heading <p> Text content continues... <blockquote> <h2> Rooted heading <p> Text content continues... <p> Text content continues... <p> Text content continues... <p> Text content continues... 1 Title 1.1 Section heading
  • 103. ADAPTIVE WEB DESIGN WORKSHOP Sectioning roots ๏ body ๏ blockquote ๏ details ๏ fieldset ๏ figure ๏ td 91
  • 104.
  • 105. ADAPTIVE WEB DESIGN WORKSHOP Dates & Times <input type="date" name="dob"/>
  • 106. ADAPTIVE WEB DESIGN WORKSHOP Numbers <input type="number" name="foo"/> <input type="range" min="1" max="11" name="foo"/>
  • 107. ADAPTIVE WEB DESIGN WORKSHOP Format validation <input type="email" …/> <input type="url" …/>
  • 108. ADAPTIVE WEB DESIGN WORKSHOP Format validation <input type="text" pattern="d{6}w{3}" placeholder="6 digits followed by 3 letters" .../>
  • 110. ADAPTIVE WEB DESIGN WORKSHOP Classi cation
  • 111. ADAPTIVE WEB DESIGN WORKSHOP Identi cation
  • 112. ADAPTIVE WEB DESIGN WORKSHOP Microformats <section class="vcard"> <figure> <img class="photo" src="aaron-gustafson.jpg" alt=""/> </figure> <h1 class="fn">Aaron Gustafson</h1> … <p>Aaron … is <b class="role">Group Manager</b> of the <a class="org" href="http://webstandards.org">Web Standards Project (WaSP)</a> ….</p> </section>
  • 113.
  • 114.
  • 115.
  • 116.
  • 117.
  • 118. Header
  • 119. ADAPTIVE WEB DESIGN WORKSHOP Semantics <div id="header"> <a href="#donate" class="donate-link" title="Click here to view our donation options">Donate</a> <a href="http://villagereach.org/feed/" class="rss-link" title="View our RSS Feed">RSS Feed</a> <div id="site-title"> <a href="http://villagereach.org" title="Village Reach: Home"> <span>Village Reach</span> </a> </div> </div><!-- #header -->
  • 120.
  • 122. ADAPTIVE WEB DESIGN WORKSHOP Semantics <div class="entry-content entry"> <!-- Features --> <div class="boxes three home"> <!-- Programs --> </div> <div id="latestNews"> <!-- Latest News --> </div> </div>
  • 123.
  • 124. Nav
  • 125. ADAPTIVE WEB DESIGN WORKSHOP Semantics <div id="hybrid-search-3" class="widget search widget-search"> <div class="widget-inside"> <form method="get" class="search-form" id="search-form" action="http://villagereach.org/"> <!--Search Form --> </form><!-- .search-form --> </div> </div> <div id="navigation"> <div id="page-nav" class="page-nav"> <ul class="menu sf-menu"> <!-- Navigation --> </ul> </div> </div><!-- #navigation -->
  • 126.
  • 127. Extra Social Newsletter
  • 128. ADAPTIVE WEB DESIGN WORKSHOP Semantics <div id="text-8" class="widget widget_text widget-widget_text"> <div class="widget-inside"> <!-- Extra --> </div> </div> <div id="text-7" class="widget widget_text widget-widget_text"> <div class="widget-inside"> <!-- Social --> </div> </div> <div id="mc_signup_container"> <!-- Newsletter --> </div>
  • 129.
  • 130. Footer
  • 131. ADAPTIVE WEB DESIGN WORKSHOP Semantics <div id="footer-container"> <div id="footer"> <p class="copyright">Copyright &#169; 2011 <a class="site-link" href="http://villagereach.org" title="VillageReach" rel="home"><span>VillageReach</span></a>. - All rights reserved.</p> </div><!-- #footer --> </div><!-- #footer-container -->
  • 132. User Experience Design Semantics BASIC ADVANCED Browser Capabilities Content
  • 133. ADAPTIVE WEB DESIGN WORKSHOP Parsing errors p{ color: red; }
  • 134. ADAPTIVE WEB DESIGN WORKSHOP Parsing errors p{ color: red; }
  • 135. ADAPTIVE WEB DESIGN WORKSHOP Parsing errors p{ color: red; font-weight: bold; }
  • 136. ADAPTIVE WEB DESIGN WORKSHOP Parsing errors p{ color: red; font-weight: bold; }
  • 137. ADAPTIVE WEB DESIGN WORKSHOP Parsing errors p { color: #ccc; color: rgba( 0, 0, 0, .5 ); }
  • 138. ADAPTIVE WEB DESIGN WORKSHOP Parsing errors html[lang] p { color: #ccc; color: rgba( 0, 0, 0, .5 ); }
  • 139. ADAPTIVE WEB DESIGN WORKSHOP Parsing errors @-moz-document url-prefix() { html[lang] p { color: #ccc; color: rgba( 0, 0, 0, .5 ); } }
  • 140. #intro { /* Basic Layout */ } /* ... */ body[id=css-zen-garden] #intro { /* Advanced Layout */ }
  • 141. #intro { /* Basic Layout */ } /* ... */ [foo], #intro { /* Advanced Layout */ }
  • 142. ADAPTIVE WEB DESIGN WORKSHOP Parsing errors @import 'not-for-IE7-or-below.css' screen; @media screen, print, refrigerator { /* IE will get these rules */ }
  • 143. ADAPTIVE WEB DESIGN WORKSHOP Organization design
  • 144. ADAPTIVE WEB DESIGN WORKSHOP Organization type color layout
  • 145. ADAPTIVE WEB DESIGN WORKSHOP Organization /* =Typography */ img { display: block; } /* =Layout */ @media screen { .frame .inner { border: 10px solid; } } /* =Color */ .frame .inner { background-color: rgb(227, 222, 215); border-color: rgb(227, 222, 215); }
  • 146. ADAPTIVE WEB DESIGN WORKSHOP Organization type.css layout.css main.css color.css
  • 147. ADAPTIVE WEB DESIGN WORKSHOP Organization {embed="styles/typography"} @media screen {   {embed="styles/layout-screen"} } {embed="styles/color"} Example using ExpressionEngine embed tags
  • 148. ADAPTIVE WEB DESIGN WORKSHOP Organization {embed="styles/reset"} {embed="styles/typography"} @media screen {   {embed="styles/layout-screen"} } @media print {   {embed="styles/layout-print"} } {embed="styles/color"} {embed="styles/effects"} Example using ExpressionEngine embed tags
  • 149. ADAPTIVE WEB DESIGN WORKSHOP Monkey-patching <link rel="stylesheet" href="main.css"/> <!--[if IE 9]><link rel="stylesheet" href="ie9.css"/><![endif]--> <!--[if lte IE 8]><link rel="stylesheet" href="ie8.css"/><![endif]--> <!--[if lte IE 7]><link rel="stylesheet" href="ie7.css"/><![endif]--> <!--[if lte IE 6]><link rel="stylesheet" href="ie6.css"/><![endif]-->
  • 150. ADAPTIVE WEB DESIGN WORKSHOP Monkey-patching @-moz-document url-prefix() { /* GENERATED CONTENT - FF3 doesn't allow positioning */ #extra-mile:before { content: ''; } #extra-mile:first-of-type:before { content: url(extra-mile-sign.png); } }
  • 151. ADAPTIVE WEB DESIGN WORKSHOP Media Queries
  • 152. ADAPTIVE WEB DESIGN WORKSHOP @Media blocks @media screen { /* Styles for screen media only */ }
  • 153. ADAPTIVE WEB DESIGN WORKSHOP @Media blocks+ @media screen and (max-width:450px) { /* Styles for screen media when browser is 450px wide or below */ }
  • 154. ADAPTIVE WEB DESIGN WORKSHOP Getting granular @media screen and (min-device-width:1024px) and (max-width:989px), screen and (max-device-width:480px), screen and (max-device-width:480px) and (orientation:landscape), screen and (min-device-width:481px) and (orientation:portrait) { /* Layout for narrower desktop (below 990px) or iPhone running iOS 3 (or equivalent) or iPhone running iOS 4 (or equivalent) in “landscape” view or iPad (or equivalent) in “portrait” view */ }
  • 155. ADAPTIVE WEB DESIGN WORKSHOP Mobile First w/ media queries /* Universal Layout */ @media screen { /* Styles for all screens */ } @media screen and (min-width:481px) { /* Styles for all screens 480px+ width */ } @media screen and (min-width:754px) { /* Styles for all screens 754px+ width */ }
  • 156.
  • 157.
  • 158.
  • 159.
  • 160.
  • 161.
  • 162.
  • 163.
  • 164. ADAPTIVE WEB DESIGN WORKSHOP Mobile First w/ media queries #hd { background: url(hd-bg-small.png) repeat-x 50% 50%; } #hd .logo a { background: url(logo-small.png) no-repeat 50% 0; display: block; width: 240px; height: 109px; /* … */ } @media screen and (min-width: 481px) { #hd { background: url(hd-bg.png) no-repeat 50% 52px; } #hd .logo a { background-image: url(logo.png); width: 342px; height: 155px; } }
  • 165. Header Nav Features Extra Social Programs Newsletter News Footer
  • 166.
  • 167. Header Nav Features Extra Social Programs Newsletter News Footer
  • 168. User Experience Interactivity Design Semantics BASIC ADVANCED Browser Capabilities Content
  • 170. ADAPTIVE WEB DESIGN WORKSHOP Sins of our past <a href="javascript:someFunction();">some text</a> <a href="javascript:void(null);" onclick="someFunction();">some text</a> <a href="#" onclick="someFunction();">some text</a>
  • 171. ADAPTIVE WEB DESIGN WORKSHOP A minor improvement <a href="http://offsite.com" onclick="newWin( this.href ); return false;"> some text</a>
  • 173. ADAPTIVE WEB DESIGN WORKSHOP Event listeners window.onload = handleExternalLinks; function handleExternalLinks() { var server = document.location.hostname; var anchors = document.getElementsByTagName("a"); var i, href; for( i=0; i < anchors.length; i++ ) { href = anchors[i].href; if ( href.indexOf("http://" + server) == -1 && href.indexOf("https://" + server) == -1 ) { // HREF is not a file on my server anchors[i].onclick = function() { newWin( this.href ); }; } } }
  • 175. ADAPTIVE WEB DESIGN WORKSHOP Listen and delegate document .getElementsByTagName( 'body' )[0] .onclick = clickDelegator; function clickDelegator( e ) { e = ( e ) ? e : event; var el = e.target || e.srcElement; // external links if ( el.nodeName.toLowerCase() == 'a' && el.getAttribute( 'rel' ) == 'external' ) { newWin( el.href ); } }
  • 177. ADAPTIVE WEB DESIGN WORKSHOP Test for dependencies function someFunction() { if ( !document.getElementsByTagName ) return; // code that uses document.getElementsByTagName() }
  • 178. ADAPTIVE WEB DESIGN WORKSHOP Test for dependencies function someFunction() { if ( !document.getElementsByTagName || !document.getElementById ) return; /* code that uses document.getElementsByTagName() and document.getElementById() */ }
  • 179. ADAPTIVE WEB DESIGN WORKSHOP Test for dependencies function someFunction() { if ( !document.getElementsByTagName || !document.getElementsByTagName('p') ) return; // code that requires the presence of a P element }
  • 180. ADAPTIVE WEB DESIGN WORKSHOP Test for dependencies function someFunction() { if ( !document.getElementById || !document.getElementById('content') ) return; // code that requires the presence of #content }
  • 181. ADAPTIVE WEB DESIGN WORKSHOP Test for dependencies function someFunction() { if ( typeof( Prototype ) == 'undefined' || parseFloat( Prototype.Version ) < 1.5 ) return; // code that uses Prototype 1.5 or higher }
  • 182. ADAPTIVE WEB DESIGN WORKSHOP Test for dependencies window.addEventListener( 'load', function(){ if ( document.getElementsByTagName && document.getElementById ) { someFunction(); } }, false );
  • 184.
  • 185.
  • 186.
  • 187.
  • 188.
  • 189.
  • 190.
  • 191.
  • 192.
  • 195. ADAPTIVE WEB DESIGN WORKSHOP Anchor-include pattern Source of blog entry page <a href="/archives/{entry_date format='%Y/%m/%d'}/{url_title}/ comments/#comments" data-replace="/comments/{url_title}/">View comments on this entry and add your own</a> {if segment_4=="comments"} <section id="comments" class="focal"> {embed="inc/.comments" url_title="{url_title}"} </section> {if:else} {comment_loader} {/if} Examples use ExpressionEngine tags
  • 196. ADAPTIVE WEB DESIGN WORKSHOP Anchor-include pattern Source of blog entry page <a href="/archives/{entry_date format='%Y/%m/%d'}/{url_title}/ comments/#comments" data-replace="/comments/{url_title}/">View comments on this entry and add your own</a> {if segment_4=="comments"} <section id="comments" class="focal"> {embed="inc/.comments" url_title="{url_title}"} </section> {if:else} {comment_loader} {/if} Examples use ExpressionEngine tags
  • 197. ADAPTIVE WEB DESIGN WORKSHOP Anchor-include pattern Source of /comments/{url_title} (technically /pages/comments/{url_title}) {embed="inc/.comments" url_title="{segment_3}"} Example uses ExpressionEngine tags
  • 198. ADAPTIVE WEB DESIGN WORKSHOP Anchor-include pattern https://gist.github.com/b976b67e88ffbfc9f125 $.fn.ajaxInclude = function(){ return this.each(function() { var $el = $( this ), target = $el.data( 'target' ), $targetEl = target && $( target ) || $el, methods = [ 'append', 'replace', 'before', 'after' ], ml = methods.length, method, url; while ( ml-- ) { method = methods[ ml ]; if ( $el.is( '[data-' + method + ']' ) ) { url = $el.data( method ); break; } } if ( method == 'replace' ) { method += 'With'; } if ( url && method ) { $.get( url, function( data ){ $el.trigger( 'ajaxInclude', [$targetEl, data] ); $targetEl[ method ]( data ); }); } }); };
  • 199. ADAPTIVE WEB DESIGN WORKSHOP Anchor-include pattern Replace: <a data-replace="articles/latest/fragment" href="...">Latest Articles</a> Before: <a data-before="articles/latest/fragment" href="...">Latest Articles</a> After: <a data-after="articles/latest/fragment" href="...">Latest Articles</a>
  • 200. ADAPTIVE WEB DESIGN WORKSHOP Anchor-include pattern $("[data-append],[data-replace],”+ “[data-after],[data-before]").ajaxInclude();
  • 201. ADAPTIVE WEB DESIGN WORKSHOP 176
  • 202. JavaScript CSS
  • 203. ADAPTIVE WEB DESIGN WORKSHOP Remember stu like this? <a href="foo.html" style="color:blue;" onmouseover="this.style.color='red'" onmouseout="this.style.color='blue'">Foo</a>
  • 204. ADAPTIVE WEB DESIGN WORKSHOP Remember stu like this? <a href="foo.html" style="color:blue;" onmouseover="this.style.color='red'" onmouseout="this.style.color='blue'">Foo</a> a, a:link, a:visited { color: blue; } a:hover { color: red; }
  • 205. ADAPTIVE WEB DESIGN WORKSHOP Isn’t this the same? for( i=0; i<objects.length; i++){ objects[i].style.display = 'none'; }
  • 206. ADAPTIVE WEB DESIGN WORKSHOP Small improvement for( i=0; i<objects.length; i++){ objects[i].style.position = 'absolute'; objects[i].style.left = '-999em'; }
  • 207. ADAPTIVE WEB DESIGN WORKSHOP Separation for( i=0; i<objects.length; i++){ objects[i].addClassName( 'hidden' ); } .hidden { position: absolute; left: -999em; }
  • 208. ADAPTIVE WEB DESIGN WORKSHOP Maintenance options ๏ external style rules added to your CSS le (by hand) ๏ external CSS le added to the document (by hand) ๏ external CSS le added to the document via script ๏ embedding CSS in the document via script 182
  • 209. ADAPTIVE WEB DESIGN WORKSHOP Option 1: Add by hand /* =START WickedCool Script CSS (do not remove) */ .wicked { color: red; font: bold 4em/2 "Comic Sans"; } .cool { color: blue; font: bold 4em/2 "Comic Sans"; } /* =END WickedCool Script CSS */
  • 210. ADAPTIVE WEB DESIGN WORKSHOP Option 2: Include by hand <script src="WickedCool.js"></script> <link rel="stylesheet" href="WickedCool.css" />
  • 211. ADAPTIVE WEB DESIGN WORKSHOP Option 2: Include by hand <script src="WickedCool.js"></script> <link rel="stylesheet" href="WickedCool.css" /> <head> <!-- … --> <link rel="stylesheet" href="WickedCool.css" /> </head> <body> <!-- … --> <script src="WickedCool.js"></script> </body>
  • 212. ADAPTIVE WEB DESIGN WORKSHOP Option 3: Scripted include function FindPath( filename ) { var path = false; var scripts = document.getElementsByTagName( 'script' ); for( var i=0; i<scripts.length; i++ ) { if( scripts[i].getAttribute( 'src' ) && scripts[i].getAttribute( 'src' ) .indexOf( filename ) != -1 ) { path = scripts[i] .getAttribute( 'src' ) .replace( new RegExp( filename ), '' ); break; } } return path; }
  • 213. ADAPTIVE WEB DESIGN WORKSHOP Option 3: Scripted include var WickedCool = { jsFile: 'WickedCool.js', cssFile: 'WickedCool.css', initialize: function(){ // determine the path var path = FindPath( this.jsFile ); // add the CSS file var css = document.createElement( 'link' ); css.setAttribute( 'rel', 'stylesheet' ); css.setAttribute( 'href', path + this.cssFile ); document.getElementsByTagName( 'head' )[0] .appendChild( css ); // do the rest of the wicked cool stuff } };
  • 214. ADAPTIVE WEB DESIGN WORKSHOP Option 4: Scripted embed function addCSS( styles ) { var el = document.createElement( 'style' ); el.setAttribute( 'type', 'text/css' ); if ( el.styleSheet ) { el.styleSheet.cssText = styles; } else { el.appendChild( document.createTextNode( styles ) ); } document.getElementsByTagName( 'head' )[0] .appendChild( el ); }
  • 215. ADAPTIVE WEB DESIGN WORKSHOP Option 4: Scripted embed var WickedCool = { _css: '.wicked { color: red; ' + ' font: bold 4em/2 "Comic Sans"; } ' + '.cool { color: blue; ' + ' font: bold 4em/2' "Comic Sans"; }', initialize: function() { // add the CSS addCSS( this._css ); // do the rest of the wicked cool stuff } }; based on the work of Nicholas Zakas
  • 217. ADAPTIVE WEB DESIGN WORKSHOP How do we do that? .TabInterface-folder { /* ... */ } #TabInterface .tab { /* ... */ } #TabInterface .tab.active { /* ... */ } 190
  • 218. ADAPTIVE WEB DESIGN WORKSHOP How do we do that? Tactic Default Activated add “-on” to the class .tabbed .tabbed-on add an activation class .auto-submit .auto-submit.active change the form of the .replace-me .replaced class
  • 219. ADAPTIVE WEB DESIGN WORKSHOP Media Queries
  • 220. ADAPTIVE WEB DESIGN WORKSHOP Mobile interfaces
  • 221. ADAPTIVE WEB DESIGN WORKSHOP Swapping content var trigger = 659; // … function toggleDisplay() { var width = $window.width(); if ( showing == 'old' && width <= trigger ) { $old_nav.replaceWith($new_nav); showing = 'new'; } else if ( showing == 'new' && width > trigger ) { $new_nav.replaceWith($old_nav); showing = 'old'; } }
  • 222.
  • 223.
  • 224.
  • 225.
  • 226. ADAPTIVE WEB DESIGN WORKSHOP Semantics <ul> <li> <a href="#"><img src="…" alt="" /></a> <span>Your new online source for information on our progress</span> </li> <li> <a href="#"><img src="…" alt="" /></a> <span>VillageReach Announces Mozambique National Expansion</span> </li> <li> <a href="#"><img src="…" alt="" /></a> <span>VillageReach's innovative approach for last mile communities</span> </li> … </ul>
  • 227. ADAPTIVE WEB DESIGN WORKSHOP Style? <ul style=”height: 300px;”> <li style=”height: 300px;” > <a href="#"><img src="…" alt="" /></a> <span>Your new online source for information on our progress</span> </li> <li style=”height: 300px;” > <a href="#"><img src="…" alt="" /></a> <span>VillageReach Announces Mozambique National Expansion</span> </li> <li style=”height: 300px;” > <a href="#"><img src="…" alt="" /></a> <span>VillageReach's innovative approach for last mile communities</span> </li> … </ul>
  • 228.
  • 229. ADAPTIVE WEB DESIGN WORKSHOP Style? <ul class="jcarousel-skin-vr" style=”height: 300px;”> <li style=”height: 300px;”> <a href="#"><img src="…" alt="" /></a> <span>Your new online source for information on our progress</span> </li> <li style=”height: 300px;”> <a href="#"><img src="…" alt="" /></a> <span>VillageReach Announces Mozambique National Expansion</span> </li> <li style=”height: 300px;”> <a href="#"><img src="…" alt="" /></a> <span>VillageReach's innovative approach for last mile communities</span> </li> … </ul>
  • 230. ADAPTIVE WEB DESIGN WORKSHOP Script <ul id="vr-carousel"> <li> <a href="#"><img src="…" alt="" /></a> <span>Your new online source for information on our progress</span> </li> <li> <a href="#"><img src="…" alt="" /></a> <span>VillageReach Announces Mozambique National Expansion</span> </li> <li> <a href="#"><img src="…" alt="" /></a> <span>VillageReach's innovative approach for last mile communities</span> </li> … </ul>
  • 231. ADAPTIVE WEB DESIGN WORKSHOP Script $j('#vr-carousel').jcarousel({ auto: 6, visible: 1, animation: 0, wrap: 'both', scroll: 1, initCallback: vrCarousel_initCallback, itemFirstInCallback: vrCarousel_itemFirstInCallback, itemFirstInCallback: vrCarousel_fadeIn, itemFirstOutCallback: vrCarousel_fadeOut });
  • 232. ADAPTIVE WEB DESIGN WORKSHOP Script function vrCarousel_initCallback( carousel, item, idx, state ) { // Pause autoscrolling if the user moves // with the cursor over the clip. carousel.clip.hover(function() { carousel.stopAuto(); }, function() { carousel.startAuto(); }); $j('.jcarousel-item').css('opacity', 0); };
  • 233. ADAPTIVE WEB DESIGN WORKSHOP Script function vrCarousel_initCallback( carousel, item, idx, state ) { var $i = carousel.list.find(‘img’), h = 0; // get the max h $i.each(function(){ var test = $j(this).height(); if ( test > h ){ h = test; } }); // … carousel.list.height(h); $j('.jcarousel-item').css({ opacity: 0, height: h }); };
  • 235. User Experience Accessibility Interactivity Design Semantics BASIC ADVANCED Browser Capabilities Content
  • 238. “special needs” can be CONTEXTUAL
  • 239.
  • 240.
  • 241.
  • 242. ADAPTIVE WEB DESIGN WORKSHOP What is it?
  • 243. ADAPTIVE WEB DESIGN WORKSHOP What is it?
  • 244. ADAPTIVE WEB DESIGN WORKSHOP What is it? <button>Tweet</button> <a class=”button”>Tweet</a>
  • 245. ADAPTIVE WEB DESIGN WORKSHOP What is it? <button>Tweet</button> <a class=”button”>Tweet</a>
  • 246. ADAPTIVE WEB DESIGN WORKSHOP What is it?
  • 247. ADAPTIVE WEB DESIGN WORKSHOP What is it?
  • 248. ADAPTIVE WEB DESIGN WORKSHOP What is it? <button>Search Mail</button> <div>Search Mail</div>
  • 249. ADAPTIVE WEB DESIGN WORKSHOP What is it? <button>Search Mail</button> <div>Search Mail</div>
  • 250. ADAPTIVE WEB DESIGN WORKSHOP ARIA maps the OS to the web
  • 252. ADAPTIVE WEB DESIGN WORKSHOP All the web’s a play… <section id="main" role="main"> <!-- The primary content for the page would go here --> </section>
  • 253.
  • 258.
  • 261.
  • 263. ADAPTIVE WEB DESIGN WORKSHOP Semantic comparison Ad-hoc ARIA Role HTML5 #header, #top banner header (kind of) #main, #content main none #extra, .sidebar complementary, note aside #footer, #bottom contentinfo footer #nav navigation nav .hentry article article
  • 264.
  • 265. ADAPTIVE WEB DESIGN WORKSHOP These are the droids you seek <span role="button">OK</span> <div role="alert"> <p>Something went wrong.</p> </div> <div role="alertdialog"> <p>Something went wrong.</p> <img src="x.png" alt="dismiss" role="button" /> </div>
  • 266. ADAPTIVE WEB DESIGN WORKSHOP What is it? <a role=”button”>Tweet</a> class=”button”>Tweet</a>
  • 267. ADAPTIVE WEB DESIGN WORKSHOP What is it? <a role=”button”>Tweet</a>
  • 268.
  • 269. ADAPTIVE WEB DESIGN WORKSHOP What’s happening? B B (off) (on) <span> <img src="bold-off.png" alt="bold" /> </span> <span> <img src="bold-on.png" alt="bold" /> </span>
  • 270. ADAPTIVE WEB DESIGN WORKSHOP What’s happening? B B (off) (on) <span> <img src="bold-off.png" alt="not bold" /> </span> <span> <img src="bold-on.png" alt="bold" /> </span>
  • 271. ADAPTIVE WEB DESIGN WORKSHOP What’s happening? B B (off) (on) <span role="button" aria-pressed="false"> <img src="bold-off.png" alt="not bold" /> </span> <span role="button" aria-pressed="true"> <img src="bold-on.png" alt="bold" /> </span>
  • 272. ADAPTIVE WEB DESIGN WORKSHOP Complex interfaces
  • 273. ADAPTIVE WEB DESIGN WORKSHOP Traditional approach <h1>Pumpkin Pie</h1> <div class="container"> <div class="section"> <h2>Overview</h2> <img src="pie.jpg" alt=""> <p>Whether you're hosting a festive party or a casual get-together with friends, our Pumpkin Pie will make entertaining easy!</p> <!-- ... --> </div> <!-- ... --> <ul class="tabs"> <li><a href="#">Overview</a></li> <li><a href="#">Ingredients</a></li> <li><a href="#">Directions</a></li> <li><a href="#">Nutrition</a></li> </ul> </div>
  • 274. ADAPTIVE WEB DESIGN WORKSHOP Cleaner approach <h1>Pumpkin Pie</h1> <div class="tabbed"> <h2>Overview</h2> <img src="pie.jpg" alt="" /> <p>Whether you're hosting a festive party or a casual get-together with friends, our Pumpkin Pie will make entertaining easy!</p> <!-- ... --> <h2>Ingredients</h2> <ul> <li>1 (9<abbr title="inch">in</abbr>) unbaked deep dish pie crust</li> <li>½ cup white sugar</li> <!-- ... --> </ul> <h2>Directions</h2> <!-- ... --> </div>
  • 275. ADAPTIVE WEB DESIGN WORKSHOP Cleaner approach <h1>Pumpkin Pie</h1> <div class="tabbed"> <h2>Overview</h2> <img src="pie.jpg" alt="" /> <p>Whether you're hosting a festive party or a casual get-together with friends, our Pumpkin Pie will make entertaining easy!</p> <!-- ... --> <h2>Ingredients</h2> <ul> <li>1 (9<abbr title="inch">in</abbr>) unbaked deep dish pie crust</li> <li>½ cup white sugar</li> <!-- ... --> </ul> <h2>Directions</h2> <!-- ... --> </div>
  • 276. ADAPTIVE WEB DESIGN WORKSHOP No JS, basic CSS
  • 277. ADAPTIVE WEB DESIGN WORKSHOP Widget logic Page
  • 278. ADAPTIVE WEB DESIGN WORKSHOP Widget logic Page JS?
  • 279. ADAPTIVE WEB DESIGN WORKSHOP Widget logic Page JS? No
  • 280. ADAPTIVE WEB DESIGN WORKSHOP Widget logic Split Page the content & make some tabs JS? Yes No
  • 281. ADAPTIVE WEB DESIGN WORKSHOP On DOM ready <h1>Pumpkin Pie</h1> <div class="tabbed-on"> <section> <h2>Overview</h2> <img src="pie.jpg" alt=""> <p>Whether you're hosting a festive party or a casual get-together with friends, our Pumpkin Pie will make entertaining easy!</p> <!-- ... --> </section> <!-- ... --> <ul class="tabs"> <li><a href="#">Overview</a></li> <li><a href="#">Ingredients</a></li> <li><a href="#">Directions</a></li> <li><a href="#">Nutrition</a></li> </ul> </div>
  • 282. ADAPTIVE WEB DESIGN WORKSHOP Adding ARIA role="tablist" 246
  • 283. ADAPTIVE WEB DESIGN WORKSHOP Adding ARIA role="tab" aria-selected="true" aria-controls="folder-1"
  • 284. ADAPTIVE WEB DESIGN WORKSHOP Adding ARIA role="tab" aria-selected="false" aria-controls="folder-4"
  • 285. ADAPTIVE WEB DESIGN WORKSHOP Adding ARIA role="tabpanel" aria-hidden="false" aria-labelledby="folder-1-tab"
  • 286. ADAPTIVE WEB DESIGN WORKSHOP Adding ARIA role="application" aria-activedescendant="folder-1"
  • 287. ADAPTIVE WEB DESIGN WORKSHOP Result!
  • 288. Photo credit: emilio labrador
  • 289. ADAPTIVE WEB DESIGN WORKSHOP Typical hiding schemes Accessibility CSS Rules Display E ect E ect visibility: hidden; Element is hidden from Content is ignored by screen view, but is not removed readers from the normal ow (i.e. it still takes up the space it normally would) display: none; Element is removed from Content is ignored by screen the normal ow and hidden; readers the space it occupied is collapsed height: 0; Element is collapsed and Content is ignored by screen width: 0; contents are hidden readers overflow: hidden;
  • 290. ADAPTIVE WEB DESIGN WORKSHOP Typical hiding schemes Accessibility CSS Rules Display E ect E ect text-indent: -999em; Contents are shifted o - Screen readers have access screen and hidden from to the content, but the view, but links may “focus” content is limited to text and oddly and negative indent inline elements may not prove long enough to fully hide content position: absolute; Content is removed from Screen readers have access left: -999em; the normal ow and shifted to the content o the left-hand edge; the space it occupied is collapsed
  • 291. ADAPTIVE WEB DESIGN WORKSHOP Typical hiding schemes Accessibility CSS Rules Display E ect E ect position: absolute; Content is positioned Screen readers have access /* IE6, IE7 */ absolutely (and is removed to the content clip: rect( 1px 1px 1px 1px from the normal ow), but ); remains in place and is /* W3C */ clipped to become invisible clip: rect( 1px, 1px, 1px, 1px ); padding: 0; border: 0; height: 1px; width: 1px; overflow: hidden;
  • 292. ADAPTIVE WEB DESIGN WORKSHOP Typical hiding schemes Accessibility CSS Rules Display E ect E ect visibility: hidden; Element is hidden from Content is ignored by screen view, but is not removed readers from the normal ow (i.e. it still takes up the space it normally would) display: none; Element is removed from Content is ignored by screen the normal ow and hidden; readers the space it occupied is collapsed height: 0; Element is collapsed and Content is ignored by screen width: 0; contents are hidden readers overflow: hidden;
  • 293. ADAPTIVE WEB DESIGN WORKSHOP “Fixing” libraries (function(){ var $button = $('#myButton'), $text = $('#myText'), visible = true; $button.click(function(){ if ( visible ) { $text.slideUp('fast'); } else { $text.slideDown('fast'); } visible = ! visible; }); })();
  • 294. ADAPTIVE WEB DESIGN WORKSHOP “Fixing” libraries (function(){ var $button = $('#myButton'), $text = $('#myText'), visible = true; $button.click(function(){ if ( visible ) { $text.slideUp('fast',function(){ $text.addClass('accessibly-hidden') .slideDown(0); }); } else { $text.slideUp(0,function(){ $text.removeClass('accessibly-hidden') .slideDown('fast'); }); } visible = ! visible; }); })();
  • 296. ADAPTIVE WEB DESIGN WORKSHOP Managing focus <div tabindex="0"> <p>This <code>div</code> can now receive focus using a keyboard’s <kbd>tab</kbd> key. How cool is that?</p> </div> <div tabindex="-1"> <p>This <code>div</code> won’t be focused by a user via the <kbd>tab</kbd> key, but JavaScript can <code>focus()</code> it. Nifty, huh?</p> </div>
  • 297.
  • 298. ADAPTIVE WEB DESIGN WORKSHOP Hey! Over here!
  • 299. ADAPTIVE WEB DESIGN WORKSHOP Hey! Over here! <input class="tweet-counter" value="140" disabled="disabled">
  • 300. ADAPTIVE WEB DESIGN WORKSHOP Hey! Over here! <span id="chars_left_notice" class="numeric"> <strong id="status-field-char-counter" class="char-counter">140</strong> </span>
  • 301. ADAPTIVE WEB DESIGN WORKSHOP Hey! Over here! <span class="tweet-counter">140 <b class="hidden"> characters remaining</b></span> .hidden { position: absolute; left: −999em; }
  • 302. ADAPTIVE WEB DESIGN WORKSHOP Hey! Over here! <span class="tweet-counter">maximum of 140 characters</span> <span class="tweet-counter">140 <b class="hidden"> characters remaining</b></span>
  • 303. ADAPTIVE WEB DESIGN WORKSHOP Hey! Over here! <span aria-live="polite" aria-atomic="true" class="tweet-counter">140<b class="hidden"> characters remaining</b></span>
  • 304. ADAPTIVE WEB DESIGN WORKSHOP Hey! Over here!
  • 305.
  • 306. Header
  • 307. ADAPTIVE WEB DESIGN WORKSHOP ARIA Roles <div id="header"> <a href="#donate" class="donate-link" title="Click here to view our donation options">Donate</a> <a href="http://villagereach.org/feed/" class="rss-link" title="View our RSS Feed">RSS Feed</a> <div id="site-title"> <a href="http://villagereach.org" title="Village Reach: Home"> <span>Village Reach</span> </a> </div> </div><!-- #header -->
  • 309. ADAPTIVE WEB DESIGN WORKSHOP ARIA Roles <div class="entry-content entry"> <!-- Features --> <div class="boxes three home"> <!-- Programs --> </div> <div id="latestNews"> <!-- Latest News --> </div> </div>
  • 310. Nav
  • 311. ADAPTIVE WEB DESIGN WORKSHOP ARIA Roles <div id="hybrid-search-3" class="widget search widget-search"> <div class="widget-inside"> <form method="get" class="search-form" id="search-form" action="http://villagereach.org/"> <!--Search Form --> </form><!-- .search-form --> </div> </div> <div id="navigation"> <div id="page-nav" class="page-nav"> <ul class="menu sf-menu"> <!-- Navigation --> </ul> </div> </div><!-- #navigation -->
  • 312. Extra Social Newsletter
  • 313. ADAPTIVE WEB DESIGN WORKSHOP ARIA Roles <div id="text-8" class="widget widget_text widget-widget_text"> <div class="widget-inside"> <!-- Extra --> </div> </div> <div id="text-7" class="widget widget_text widget-widget_text"> <div class="widget-inside"> <!-- Social --> </div> </div> <div id="mc_signup_container"> <!-- Newsletter --> </div>
  • 314. Footer
  • 315. ADAPTIVE WEB DESIGN WORKSHOP ARIA Roles <div id="footer-container"> <div id="footer"> <p class="copyright">Copyright &#169; 2011 <a class="site-link" href="http://villagereach.org" title="VillageReach" rel="home"><span>VillageReach</span></a>. - All rights reserved.</p> </div><!-- #footer --> </div><!-- #footer-container -->
  • 316.
  • 317. ADAPTIVE WEB DESIGN WORKSHOP ARIA Roles & States <div class="jcarousel-container jcarousel-container-horizontal" style="display: block; "> <ul id="vr-carousel"> <li> <a href="#"><img src="…" alt="" /></a> <span>Your new online source for information on our progress</span> </li> <li> <a href="#"><img src="…" alt="" /></a> <span>VillageReach Announces Mozambique National Expansion</span> </li> … </ul> </div>
  • 318. ADAPTIVE WEB DESIGN WORKSHOP ARIA Roles & States <div id="jcarousel-control"> <div class="jcarousel-prev jcarousel-prev-horizontal" style="display: block; " disabled="false"></div> <span id="jcarousel-control-caption"> VillageReach Announces Mozambique National Expansion </span> <div class="jcarousel-next jcarousel-next-horizontal" style="display: block; " disabled="false"></div> </div>
  • 319. Adaptive Web Design Workshop by Aaron Gustafson More of the same: http://adaptivewebdesign.info http://easy-designs.net http://blog.easy-designs.net http://aaron-gustafson.com Slides available at http://slideshare.net/AaronGustafson © Aaron Gustafson. All Rights Reserved.