W3Conf
Table of Contents
- 1. W3Conf - Tuesday
- 1.1. Testing to Perfection by @plhw3org
- 1.2. Community Groups: Web Payments @manusporny
- 1.3. Developer Resources by @shepazu
- 1.4. CSS3 for Layout Troubles by @divya
- 1.5. Web Graphics by @vincent_hardy
- 1.6. Web Performance by @arvindjain
- 1.7. Getting offline with AppCache by @johnallsopp
- 1.8. N-screens problem by @rajeshlalnokia
- 1.8.1. HTML History
- 1.8.2. TODO Tools
- 1.8.3. Display: media queries > orientation > viewport > javascript
- 1.8.4. Animation: webgl > css3 animation > canvas + js > svg + js
- 1.8.5. Audio: open al > audio data > ria audio / Flash > html5 audio
- 1.8.6. XDR: CORS > proxy > jsonp > Hybrid
- 1.8.7. API: HTML5 API > Polyfills and shimes > js
- 1.9. Polyfills and Shims by @reybango
- 1.10. Web Typography
- 1.11. HTML5
- 2. W3Conf - Wednesday
- 3. Outcomes
- 3.1. Dojo has IBM support for a11y
- 3.2. Rich applications need to be mocked and validated in HTML for ARIA
- 3.3. Input sanitizing and validation would need to be built with RIA
- 3.4. UI Toolkit Options
- 3.4.1. dependency managment
- 3.4.2. namespacing
- 3.4.3. inheritence management
- 3.4.4. widgets / ui patterns
- 3.4.5. accessibility
- 3.4.6. encoding
- 3.4.7. shims and polyfills
- 3.4.8. model support
- 3.4.9. data binding
- 3.4.10. sockets support
- 3.4.11. local storage abstractions
- 3.4.12. cross-domain communication, CORS
- 3.5. Headers
- 4. Revisited in 2026
http://w3conf.org/live.html (dead; Wayback: https://web.archive.org/web/20111119012240/http://www.w3conf.org/live.html) http://www.w3.org/conf/#presentations http://calvinf.com/blog/2011/11/16/notes-from-w3conf/
Sources used to fill in these notes:
- Scribe minutes, day 1: http://www.w3.org/2011/11/15-w3conf-scribe-minutes.html (covers Divya Manian onward; the three morning talks are not minuted)
- Scribe minutes, day 2: http://www.w3.org/2011/11/16-w3conf-scribe-minutes.html
- Schedule and session videos: https://www.w3.org/conf/2011/
- Manu Sporny's live blog of day 1, which does cover the morning: http://manu.sporny.org/2011/w3conf-day-one/ (Wayback: https://web.archive.org/web/20111128033612/http://manu.sporny.org/2011/w3conf-day-one/)
- Slide index on Lanyrd (dead; Wayback: https://web.archive.org/web/20120315050346/http://lanyrd.com/2011/w3conf/slides/)
Code blocks marked "period code" were written for these notes in 2011 style. Each one names the dated draft whose API shape it follows. None of them are executed on export.
1. W3Conf - Tuesday
1.1. Testing to Perfection by @plhw3org
Slides: http://www.w3.org/2011/Talks/1115-testing-plh/
Sourced to the slides and Sporny's live blog (the minutes start later):
- Opened with a CSS box example and asked the room what it would render; per the live blog, nobody knew and "25% of browsers will not work".
- The challenge, from the slides: "Over 100 Web specifications", stable and unstable features, browser bugs, spec bugs.
- Testing is an approximation: CSS combinations, DOM manipulation, HTML in SVG. 100% coverage will not happen, but a suite still needs a goal.
- Audience for tests: implementers, manufacturers, operators, spec editors, content providers.
- Showed the CSS 2.1 RC6 results (March 2011) and the SVG 1.1 implementation matrix (August 2011): https://www.w3.org/Style/CSS/Test/CSS2.1/20110323/reports/results.html, https://www.w3.org/Graphics/SVG/Test/20110816/status/implementation_matrix.html
- Three kinds of test: testharness.js, reftests, manual tests. Closing slide: "Every single test can make a difference!"
1.1.1. Period code: testharness.js
From the slides (slides 11-14), as shown:
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<p id="MyE">This is <span>test</span>.</p>
<div id='log'></div>
<script>
test(
function() {
var myE = document.getElementById("MyE");
assert_true(!!myE.firstElementChild);
},
"firstElementChild must exist"
);
</script>
var t = async_test("Simple test");
function run() {
t.step(
function () {
assert_true(!!MyE.firstElementChild);
}
);
t.done();
};
window.onload = run;
1.2. Community Groups: Web Payments @manusporny
Slides (per Lanyrd): http://manu.sporny.org/talks/2011-community-groups/ (dead; Wayback: https://web.archive.org/web/20160328164634/http://manu.sporny.org/talks/2011-community-groups/)
Sourced to the slides only (the Wayback copy is from 2016, the deck is the 2011 one). The minutes do not cover this talk, and Sporny's own live blog has a gap while he presented. Session video, as listed on the conference page: http://cdn-smooth.ms-studiosmedia.com/events/W3C/Day1/Web_Payments.mp4
- Standards are "deeply important social contracts", but the usual process is a "sausage factory": corporation-centric, hard for an individual to bring new work, and innovating during standardization is bad.
- Community Groups: no fees, open to anyone, light to spin up, no time limit; mailing list, wiki, tracker, blog. "30+ groups created in the past two months."
- Case study: money is a closed, centralized, opaque protocol. The Web Payments CG proposes PaySwarm, "a simple Web standard for transferring money, buying and selling digital content, and crowd-funding projects", with open specs and public meetings.
- Start-up: proposed the group, "within 5 days, 20 people joined". Status: a demo at http://dev.payswarm.com/, open specs for a REST API for financial transactions, and spin-offs: RDFa, JSON-LD, graph normalization.
- New community groups
- Opening the payments process
1.2.1. Period code: PaySwarm payment links
Not from the talk. This is the markup Sporny proposed two months earlier in
"Standardizing Payment Links" (2011-09-23),
http://manu.sporny.org/2011/payment-links/ (Wayback:
https://web.archive.org/web/20111024074014/http://manu.sporny.org/2011/payment-links/).
PaySwarm was currency agnostic; the rel names a vocabulary term and the
href is the payee's identity or account.
<!-- protocol-specific: a bitcoin: IRI -->
<a rel="bitcoin:payment"
href="bitcoin:1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa?amount=0.25">tip me</a>.
<!-- PaySwarm: pay a specific account -->
<a rel="ps:payment" href="https://dev.payswarm.com/i/manu/accounts/tips">tip me</a>.
<!-- PaySwarm: pay a person; the account is chosen by currency -->
<a rel="ps:payment" href="https://dev.payswarm.com/i/manu">tip me</a>.
The same post argues tipping is a niche case and that pages need to describe a PaySwarm Asset and Listing (http://purl.org/payswarm#Asset, http://purl.org/payswarm#Listing) so a browser can show what is being bought.
1.3. Developer Resources by @shepazu
http://www.w3.org/2011/Talks/11-schepers-w3conf/
Sourced to Sporny's live blog (not minuted). Scheduled as "Shortcuts: Developer Documentation".
- Asked who learned the web from view source (nearly everyone) and who still does (most hands went down).
- The document web was easy to learn; the application, media and social web since about 2000 are not, and "people can't read standards".
- Named W3Schools and W3Fools, the Opera Web Standards Curriculum, SitePoint, MDN, Google's "Ground Up" videos, the Web Standards Project and the InterAct curriculum (which teachers can drop into a classroom).
- W3C's own tutorials, primers and wiki reference guides exist but are "scattered everywhere".
- Announced the Web Education Community Group: learning material, curriculum, training, translation. Pitch: write, review and translate articles. "We need to change it from a hobby to a craft."
The slides are a set of SVG/HTML mini-apps (one per slide) and render only the navigation help without script.
- w3Fools.com
(Wayback: https://web.archive.org/web/20111117090935/http://w3fools.com/)
- Google's "Ground Up"
http://code.google.com/edu/submissions/html-css-javascript/ (dead, now redirects to Android docs; Wayback: https://web.archive.org/web/20111111134941/http://code.google.com/edu/submissions/html-css-javascript/)
- Opera Web Standards
http://dev.opera.com/articles/wsc/ (dead, now redirects to the Opera blog; Wayback: https://web.archive.org/web/20111117161347/http://dev.opera.com/articles/wsc/)
- MDN
- Web Standards Project
- InterAct Curriculum
1.4. CSS3 for Layout Troubles by @divya
http://nimbu.in/w3conf/#intro (dead; Wayback: https://web.archive.org/web/20111117191053/http://nimbu.in/w3conf/)
Scheduled as "5 CSS Magic Potions for your Layout Troubles from the Future" (Divya Manian, Opera). Sourced to the slides ("Layouts in CSS", archived 2011-11-17), the day 1 minutes and the live blog:
- Today: floats, positioning,
inline-block, negative margins,table-cell. Drawbacks: not content agnostic, floats need clearing, vertical centering impossible, breaks on small screens. - Five futures: paged media (
@media paged), multiple columns withcolumn-spanand break properties, regions (content flowing between distant boxes), exclusions (wrapping around arbitrary shapes), grid, and flexbox ("very much in flux"). IE10 has the grid draft, which "will change". - Mix and match: a region can be an exclusion and have columns; a flexbox or grid cannot be an exclusion nor have columns.
- Slide: "Not ready for production, probably not for a year or two." Minutes: "Be VERY careful using it in production - experiment, not putting it on stable sites."
- Feedback goes to www-style@w3.org and browser bug trackers. Pointed to Nicole Sullivan's media object and Isotope.
Recently in the news:
http://coding.smashingmagazine.com/2011/11/11/our-pointless-pursuit-of-semantic-value/comment-page-1/ (comment page is gone; Wayback: https://web.archive.org/web/20111116043004/http://coding.smashingmagazine.com/2011/11/11/our-pointless-pursuit-of-semantic-value/)
- Layout proposals
- HTML5 boilerplate
1.4.1. Current
What are
- floats (requires clearing, not content agnostics, only recent clearfix)
- absolute
1.4.2. Issues
- breaks on smaller w/o media queries
1.4.3. What is the future?
1.4.3.1. Genrated Content for Paged
http://www.w3.org/TR/css3-gcpm/
-o-page-x-controls
Is part of the CSS used. Uses a media query of page:
@media paged {
overflow-style: paged-x | page-x-controls
}
This also applied to
h1, h2 { break-avoid: after }
The slides spell it paged-x | paged-x-controls and break-after: avoid.
Support: an Opera Labs build only (http://people.opera.com/howcome/2011/reader/).
The slide also lists a script API: onpagechange, currentPage,
pageCount.
@media paged {
html {
height: 100%;
overflow-style: paged-x;
padding: 5%;
height: 100%;
box-sizing: border-box;
}
}
h1, h2 { break-after: avoid; }
1.4.3.2. Multiple Columns
http://www.w3.org/TR/css3-multicol/
Has the same control for column-span.
article {
-moz-column-width: 12em;
-webkit-column-width: 12em;
column-width: 12em;
-moz-column-gap: 1em;
-webkit-column-gap: 1em;
column-gap: 1em;
-moz-column-rule: thin solid black;
-webkit-column-rule: thin solid black;
column-rule: thin solid black;
}
article h1 {
-webkit-column-span: all; /* Firefox has no column-span yet */
column-span: all;
}
article figure { break-inside: avoid-column; }
1.4.3.3. Regions
http://dev.w3.org/csswg/css3-regions/ (dead; Wayback: https://web.archive.org/web/20111123021003/http://dev.w3.org/csswg/css3-regions/)
Set up frow-from block containers.
Can set of up a region query with
@region #main {}
Event:
getRegionsByContentNode
The published WD of June 2011 still spelled this flow: "article" and
content: from-flow("article"); the editor's draft on the slide had moved
to flow-into / flow-from. Slide API: getNamedFlow (overflow,
contentNodes, getRegionsByContentNode(node)) and the
regionLayoutUpdate event.
article.news {
flow-into: article_flow;
}
#main, #sub-topic, #news {
flow-from: article_flow;
}
@region #main {
#article { color: #0C3D5F; }
}
var flow = (document.getNamedFlow || document.getFlowByName)
.call(document, 'article_flow');
if (flow.overflow) {
// content did not fit in #main, #sub-topic, #news; add a region
}
var regions = flow.getRegionsByContentNode(document.querySelector('article.news p'));
document.addEventListener('regionLayoutUpdate', function (e) {
// flow changed; re-check flow.overflow
}, false);
1.4.3.4. Exclusions
http://dev.w3.org/csswg/css3-exclusions/ (dead; Wayback: https://web.archive.org/web/20111109221143/http://dev.w3.org/csswg/css3-exclusions/)
First WD followed a month later: http://www.w3.org/TR/2011/WD-css3-exclusions-20111213/
/* an element becomes an exclusion when wrap-flow is not auto */
.pullquote {
wrap-flow: both; /* left | right | maximum | both | clear | auto */
wrap-margin: 1em; /* offsets inline content outside the exclusion */
shape-outside: circle(50%, 50%, 50%);
}
.callout {
wrap-padding: 1em; /* offsets inline content inside */
shape-inside: url(#path-shape);
}
1.4.3.5. Grid
http://dev.w3.org/csswg/css3-grid-align/ (dead; Wayback: https://web.archive.org/web/20111113100241/http://dev.w3.org/csswg/css3-grid-align/)
#grid {
display: grid;
}
Doesn't need to be in document order.
Also includes a grid template.
grid-template: …
#grid {
display: -ms-grid;
display: grid;
-ms-grid-columns: auto 1fr;
grid-columns: auto minmax(min-content, 1fr);
-ms-grid-rows: auto 1fr auto;
grid-rows: auto minmax(min-content, 1fr) auto;
}
#title { -ms-grid-column: 1; -ms-grid-row: 1; grid-column: 1; grid-row: 1; }
#score { -ms-grid-column: 1; -ms-grid-row: 3; grid-column: 1; grid-row: 3; }
#board {
-ms-grid-column: 2; -ms-grid-row: 1; -ms-grid-row-span: 2;
grid-column: 2; grid-row: 1; grid-row-span: 2;
}
The grid-template: ... above, as the slide wrote it: each string is a
row, each character a column.
#grid {
display: grid;
grid-template: "ta"
"sa"
"bb"
"cc";
}
#title { grid-cell: "t" }
#score { grid-cell: "s" }
1.4.3.6. FlexBox
http://dev.w3.org/csswg/css3-flexbox/ (dead; Wayback: https://web.archive.org/web/20111123083742/http://dev.w3.org/csswg/css3-flexbox/)
body: {
display: flexbox;
flex-pack: center;
flex-align: cneter;
width: 100%;
height: 100%;
}
Two syntaxes are live in November 2011. Browsers ship the 2009 one; the 2011 drafts (and the slide above) use the new one, which no browser ships yet.
body {
display: -webkit-box;
display: -moz-box;
display: box;
-webkit-box-pack: center;
-moz-box-pack: center;
box-pack: center;
-webkit-box-align: center;
-moz-box-align: center;
box-align: center;
width: 100%;
height: 100%;
}
body {
display: flexbox;
flex-direction: lr;
flex-pack: center;
flex-align: center;
width: 100%;
height: 100%;
}
1.4.4. Recommendations
- Only use for personal sites or experiments
- Wrap with feature
- Use media object
http://www.stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code/
- Use isotope for complex layout
1.5. Web Graphics by @vincent_hardy
http://svg-wow.org/ (no longer answers; Wayback: https://web.archive.org/web/20111110114555/http://svg-wow.org/)
Scheduled as "Web Graphics - a large creative palette" (Vincent Hardy, Adobe). Sourced to the day 1 minutes and the live blog:
- Two models. Canvas is imperative and "immediate mode": draw calls leave pixels. SVG is declarative: elements persist in the DOM, take events and CSS.
- SVG event handling is per object; with canvas you work out hit testing yourself. Canvas gives pixel access and video filtering; SVG has SMIL animation (everywhere but IE) and filter effects that apply to video.
- Mix them:
foreignObject,toDataURL, SVG drawn into canvas. Graffiti Markup Language uses both. - Frameworks: Raphael, Paper.js, Easel.js; D3 and canvg also named.
- Gaps: SVG fonts (Firefox, IE), SMIL (IE), WebGL arriving, inline SVG issues. Coming: filter effects and CSS shaders, SVG 2.
1.5.1. Raphael example
1.5.2. SVG vs. Canvas
Canvas is imperative example.
Look at pointer events for fill and stroke. Very granular fill and stroke event management.
<canvas id="c" width="200" height="200"></canvas>
<script>
var ctx = document.getElementById('c').getContext('2d');
ctx.fillStyle = '#c00';
ctx.beginPath();
ctx.arc(100, 100, 50, 0, Math.PI * 2, false);
ctx.fill();
// pixels only now; a click handler has to do its own hit test
</script>
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200">
<circle cx="100" cy="100" r="50" fill="#c00" stroke="#000" stroke-width="8"
pointer-events="stroke"
onclick="this.setAttribute('fill', '#0c0')"/>
</svg>
1.5.3. Interacting with Multi-media
New work is happening on the audio API.
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
SVG also has filter effects for working with video as well.
1.5.4. Example: GML
http://www.graffitimarkuplanguage.com/ (no longer answers; Wayback: https://web.archive.org/web/20111114154953/http://www.graffitimarkuplanguage.com/)
1.5.5. Integrating
Can integrate by including sgv element with a new canvas element.
- Don't create dom nodes if we don't want to add interactivity.
- With SVG there's the cost associated with how often we will need the elements in SVG.
- Uses toDataUrl on a Canvas.
- Use offline Canvas.
var off = document.createElement('canvas'); // never attached to the document
off.width = 400; off.height = 400;
var ctx = off.getContext('2d');
for (var i = 0; i < 5000; i++) { // spray dots: no DOM node each
ctx.fillRect(Math.random() * 400, Math.random() * 400, 1, 1);
}
var img = document.createElementNS('http://www.w3.org/2000/svg', 'image');
img.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href',
off.toDataURL('image/png'));
img.setAttribute('width', 400);
img.setAttribute('height', 400);
document.getElementById('scene').appendChild(img); // an <svg id="scene">
1.5.6. Frameworks
May polyfill. Simplifies the abstraction. Look for a lively community, support, documentation.
1.5.6.1. Raphael
1.5.6.2. Paper.js
1.5.6.3. Easle.js
1.6. Web Performance by @arvindjain
Scheduled as "Web Performance: Making the Web Faster" (Arvind Jain, Google, chair of the Web Performance WG). Sourced to the day 1 minutes and the live blog:
- Four parts: Navigation Timing (IE9, Chrome, Firefox, Android), Resource Timing, User Timing (ms-precision marks and measures), Performance Timeline (one interface over all of them).
- Resource, User and Timeline implementations expected around March 2012.
- Page Visibility:
document.hiddenplus a change event. Already used by Google Analytics (do not count impressions in never-viewed tabs), the YUI idle timer, and Instant Pages prerendering. - Cross-origin resource timing can expose proxies; the WG judged the benefit worth it, with an opt-in header.
- In production use: Google Analytics Site Speed, WebPagetest, Dynatrace, Boomerang. "If you can't measure it, you can't improve it."
1.6.1. Web Timing API
1.6.2. Navigation Timing
> window.performance.timing
function onLoad() {
var now = new Date();
var perceivedLatency = now - window.performance.timing.navigationStart
}
window.onload = function () {
setTimeout(function () { // loadEventEnd is 0 until onload returns
var perf = window.performance || window.webkitPerformance
|| window.msPerformance;
if (!perf || !perf.timing) { return; }
var t = perf.timing, n = perf.navigation;
if (n.type == n.TYPE_NAVIGATE) {
var dns = t.domainLookupEnd - t.domainLookupStart;
var connect = t.connectEnd - t.connectStart;
var ttfb = t.responseStart - t.navigationStart;
var load = t.loadEventEnd - t.navigationStart;
new Image().src = '/beacon?dns=' + dns + '&connect=' + connect +
'&ttfb=' + ttfb + '&load=' + load;
}
}, 0);
};
1.6.3. Resource Timing
Allows a way to get individual element timing.
1.6.4. User Timing  msie chrome
Mark and measure functions in the page load.
> window.performance.mark
> window.performance.measure
Won't be available until March 2012.
performance.mark("search_start");
runSearch();
performance.mark("search_end");
performance.measure("search", "search_start", "search_end");
var measures = performance.getMeasures("search");
1.6.5. Performance Timeline  msie chrome
http://www.w3.org/TR/performance-timeline/
> window.performance.getEntries()
Won't be available until March 2012.
1.6.6. Security
- Same origin policy is used.
Timing-Allow-Origin
- Proxy exposure
- Fingerprinting attach
Site could determine the use based on the networking behavior.
1.6.7. TODO Page Visibility API
window.addEventListener('visibilitychange', function() { alert(1); })
Should look at ensuring the bi implementation doesn't mark the page as rendered.
The event fires on document, not window, and Chrome 13+ and IE10 ship
it prefixed.
var hidden, change;
if (typeof document.hidden !== 'undefined') {
hidden = 'hidden'; change = 'visibilitychange';
} else if (typeof document.webkitHidden !== 'undefined') {
hidden = 'webkitHidden'; change = 'webkitvisibilitychange';
} else if (typeof document.msHidden !== 'undefined') {
hidden = 'msHidden'; change = 'msvisibilitychange';
}
var PERIOD_VISIBLE = 1000, PERIOD_NOT_VISIBLE = 60000, timer;
function schedule() {
clearInterval(timer);
timer = setInterval(checkEmail,
document[hidden] ? PERIOD_NOT_VISIBLE : PERIOD_VISIBLE);
}
if (hidden) { document.addEventListener(change, schedule, false); }
schedule();
1.7. Getting offline with AppCache by @johnallsopp
Scheduled as "Shortcuts: Getting off (line) with the HTML5 appcache". Slides: http://westciv.com/speakEasy/presentations/appcache/appcache-presentation.html (from the minutes). Sourced to the minutes and the live blog:
- A manifest with three sections: CACHE (always cached), NETWORK (never cached; "bypass the old browser cache, too"), FALLBACK (used offline).
- Gotchas: must be served as
text/cache-manifest; one missing resource fails the whole cache; the cache is effectively permanent, so do not develop with it on; only listed files are available. - Change the manifest (a
# versioncomment) to force a re-fetch. Some browsers cap at 5-10MB. IE10 adds support. - Tool: ManifestR, http://www.westciv.com/manifestr
Just a three-part approach to what should be cached.
1.7.2. text/cache-manifest
http://www.softmodal.com/blog/2010/10/adding-a-mime-type-to-nginx/ (dead; Wayback: https://web.archive.org/web/20111119010644/http://www.softmodal.com/blog/2010/10/adding-a-mime-type-to-nginx/)
CACHE MANIFEST
# version 1.0.3 -- edit this line to force an update
CACHE:
/css/site.css
/js/app.js
/img/logo.png
NETWORK:
/api/
*
FALLBACK:
/ /offline.html
<!DOCTYPE html>
<html manifest="/site.appcache">
# nginx: mime.types
types {
text/cache-manifest appcache manifest;
}
# Apache: .htaccess
AddType text/cache-manifest .appcache
1.7.3. Always verify the cache
1.7.4. Don't use app cache during development
Serve with the wrong mime-type during development.
1.7.5. A double refresh is required
First for the cache manifest then for resources.
var cache = window.applicationCache;
cache.addEventListener('updateready', function () {
if (cache.status === cache.UPDATEREADY) {
cache.swapCache();
if (confirm('A new version is available. Load it?')) {
window.location.reload();
}
}
}, false);
cache.addEventListener('error', function () {
console.log('appcache failed; one listed resource is probably missing');
}, false);
1.8. N-screens problem by @rajeshlalnokia
http://www.slideshare.net/rajeshlal/n-screens-problem-w3c-conference-redmond2011
http://widgets-gadgets.com/html5/index.html (now flagged by a safe-browsing redirect; Wayback: no snapshot found)
Scheduled as "The N-Screens Problem: Building Apps in a World of TV and Mobiles" (Rajesh Lal, Nokia). Sourced to the minutes and the live blog:
- Four screens: phone (2-4", one foot, finger, interruptible), tablet (7-14"), PC (12-27", focused), TV (25-65", ten feet, D-pad).
- Web apps over native: in-browser or wrapped in a native container (hybrid, which also lifts cross-domain limits).
- Seven challenges, each with a preference order: feature detection, layout (media queries), graceful degradation, animation, audio, cross-domain Ajax, API fallbacks. The ordered lists are the headings below.
- Quoted William Gibson: "The future is here already, it is just not very evenly distributed."
1.8.1. HTML History
Covers the general ground of HTML to web applications then moving to RIA -> HTML5 -> WebApp; this is part of the discussion around the type of applications taht we want to develop.
1.8.2. TODO Tools
- Modernizer
- > jQuery.support
1.8.3. Display: media queries > orientation > viewport > javascript
only screen and (max-width: 480px); handheld
$(document).mediaquery()
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" media="handheld, only screen and (max-width: 480px)"
href="phone.css">
<style>
@media only screen and (min-width: 768px) and (orientation: landscape) {
#nav { float: left; width: 25%; }
}
</style>
1.8.4. Animation: webgl > css3 animation > canvas + js > svg + js
See Modernizer.svg for support…
1.8.6. XDR: CORS > proxy > jsonp > Hybrid
> jQuery.support.cors
if (jQuery.support.cors) {
$.getJSON('http://api.example.com/items', render); // CORS
} else if (window.XDomainRequest) {
var xdr = new XDomainRequest(); // IE8/9
xdr.onload = function () { render($.parseJSON(xdr.responseText)); };
xdr.open('GET', 'http://api.example.com/items');
xdr.send();
} else {
$.getJSON('http://api.example.com/items?callback=?', render); // JSONP
}
1.9. Polyfills and Shims by @reybango
Scheduled as "The Great HTML5 Divide: How Polyfills and Shims Let You Light Up Your Sites in Non-Modern Browsers" (Rey Bango, Microsoft). Sourced to the minutes and the live blog:
- The problem is non-modern browsers and fragmentation within and across them; caniuse.com for the map.
- Feature detection, never browser detection; Modernizr for the hard cases.
- A polyfill replicates the standard API; a shim provides the function under its own API, which means code changes later. Prefer polyfills.
- html5shiv for the new elements in old IE, plus CSS to make them block.
- Third-party polyfills are a maintenance cost. Take-aways: "avoid browser detection, use polyfills, do smart fallbacks."
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
article, aside, figure, footer, header, hgroup, nav, section {
display: block;
}
</style>
function on(el, type, fn) {
if (el.addEventListener) { // DOM Level 2 / IE9
el.addEventListener(type, fn, false);
} else if (el.attachEvent) { // IE6-8
el.attachEvent('on' + type, function () { fn.call(el, window.event); });
}
}
if (Modernizr.canvas && Modernizr.audio) {
startGame();
}
1.10. Web Typography
Scheduled as "Shortcuts: Web Typography" (Christopher Slye, Adobe). Sourced to the minutes and the live blog:
- Two outline formats (TrueType, PostScript) and two containers: EOT (IE only) and WOFF, compressed and with metadata, "the first interoperable Web Font Format".
- CSS Fonts 3 brings
@font-faceand access to OpenType layout features: kerning, ligatures, small caps, old-style figures, fractions. - Subsetting can break OpenType layout. Font services handle subsetting, licensing, format conversion.
@font-face {
font-family: 'Minion Web';
src: url('minion.eot'); /* IE6-8 */
src: url('minion.eot?#iefix') format('embedded-opentype'),
url('minion.woff') format('woff'),
url('minion.ttf') format('truetype');
}
body {
font-family: 'Minion Web', Georgia, serif;
text-rendering: optimizeLegibility; /* kerning + liga in WebKit/Gecko */
-moz-font-feature-settings: "liga=1, dlig=1, onum=1";
-ms-font-feature-settings: "liga" 1, "dlig" 1, "onum" 1;
font-feature-settings: "liga" 1, "dlig" 1, "onum" 1;
}
1.11. HTML5
http://dl.dropbox.com/u/39519/talks/html5-foundation/index.html#1 (dead; Wayback: https://web.archive.org/web/20111123173447/http://dl.dropbox.com/u/39519/talks/html5-foundation/index.html)
Scheduled as "HTML5: The Foundation of the Web Platform" (Paul Irish, Google). Sourced to the minutes and the live blog:
<!doctype html>, because browsers ignored the variants anyway;<meta charset=utf-8>before<title>because of the UTF-7 script attack.- Standardized parsing of broken markup: every browser now recovers the
same way. Optional tags (
html,head,body,pend tags), though he would still close<p>. - innerHTML: Mozilla implements it in 2000, specified in 2007.
- Tags are strings; elements are DOM objects with
dataset,firstChild. - Tricks:
data:text/html,<pre contenteditable>as an editor; a snowman is a validid; unquoted attributes. The spec is a record of browser reverse-engineering: switch the doctype, then upgrade piece by piece.
[16:38] <sylvaing> paul irish -> pour shots [16:38] <tantek> oh for a second I thought he was going to say HTML5 trading cards [16:38] <mongillo> out of towners: this awkward silence is known as the "Seattle Freeze". its common and i apologize [16:38] * plh thought this HTML5 thing was about his t-shirt.
1.11.1. History
1.11.1.1. 1997: IE 4 innerHTML
createContetualFragment vs. innerHTML
1.11.1.2. 1999 Gecko
mozInnerHtml
data:text/html <pre contenteditable>x
http://mothereffingunquotedattributes.com (no longer answers; Wayback: https://web.archive.org/web/20111120015626/http://mothereffingunquotedattributes.com/)
<!doctype html>
<meta charset=utf-8>
<title>shortest</title>
<p id=☃ class=snow data-flakes=12>Unquoted, unclosed, valid.
<script>
var p = document.getElementById('☃');
p.dataset ? p.dataset.flakes : p.getAttribute('data-flakes'); // "12"
</script>
data:text/html,<pre contenteditable>x
2. W3Conf - Wednesday
2.1. Data Visualization by @mbostock
Scheduled as "Shortcuts: Data Visualization with Web Standards" (Mike Bostock, Square). Sourced to the day 2 minutes:
- D3 maps data to the DOM in two steps: datum to element, data attribute to element attribute.
- Bar chart: a linear scale from value to width, index to y.
- D3 does not wrap HTML, SVG and CSS; it uses them directly, so browser tools and interop come for free.
- Examples: calendar heat map of US flight data (1997-2008), hierarchical edge bundling, scatterplot matrices, zoomable hierarchies.
data driven documents
create the base visual encodings for linear or ordinal (as an example).
Standards-based for
var data = [4, 8, 15, 16, 23, 42];
var x = d3.scale.linear()
.domain([0, d3.max(data)])
.range([0, 420]);
var chart = d3.select("body").append("svg")
.attr("class", "chart")
.attr("width", 420)
.attr("height", 20 * data.length);
chart.selectAll("rect")
.data(data)
.enter().append("rect")
.attr("y", function(d, i) { return i * 20; })
.attr("width", x)
.attr("height", 20);
2.2. Accessibility by @becka11y
Scheduled as "Making Accessibility Mainstream" (Becky Gibson, IBM). Sourced to the day 2 minutes:
- Reasons: legal, purchasing, independence, respect.
- Semantic HTML first: real headings, alt text, labelled form controls.
- Keyboard:
tabindex"-1"= (focusable by script),"0"(in tab order), positive values (fixed order, avoid). - Windows High Contrast detection: style a div with differing border colours and compare the computed values.
- ARIA landmarks,
role"presentation"= for layout tables, live regions,aria-required,aria-invalid,aria-describedby. - Support: VoiceOver with Safari; IE8+ with JAWS 11+. Dojo and jQuery UI for widgets.
Dojo is used by IBM and there were accessiblity reviews for the widgets.
PhoneGap is under current review by IBM.
http://www.weba11y.com/ (no longer answers; Wayback: https://web.archive.org/web/20111129002551/http://www.weba11y.com/)
2.2.2. Still very document-centric
Keyboard binding. Completed in the past for paging.
What testing is really provided.
Accessiblity done in the past. Look at the markup generated in the examples.
2.2.3. Still very server-based
What are the limits for actions that have to be done in the headers. Still would need have the header on the original request.
http://dev.opera.com/articles/view/introduction-to-wai-aria/ (dead, now redirects to the Opera blog; Wayback: https://web.archive.org/web/20111117120002/http://dev.opera.com/articles/view/introduction-to-wai-aria/)
2.2.5. isWindowsHighContrast
function isWindowsHighContrast() {
var div = document.createElement('div');
div.style.cssText = 'position:absolute;top:-999px;' +
'border:1px solid;border-color:red green;';
document.body.appendChild(div);
var cs = window.getComputedStyle ? window.getComputedStyle(div, null)
: div.currentStyle; // IE8
var hc = cs.borderTopColor == cs.borderRightColor;
document.body.removeChild(div);
return hc;
}
if (isWindowsHighContrast()) {
document.documentElement.className += ' highcontrast'; // swap CSS sprites for text
}
2.2.6. role="presentation"
For images with just layout.
2.2.7. Aria Live Regions
Shows when
aria-live="assertive"
"Not much harder to to add an additional work to add an additional element": this discounts the testing costs.
<div role="banner">...</div>
<div role="navigation">...</div>
<div role="main">
<table role="presentation"><tr><td><img src="spacer.gif" alt=""></td></tr></table>
<label for="email">Email</label>
<input id="email" type="text" aria-required="true"
aria-invalid="true" aria-describedby="email-err">
<span id="email-err">Enter an address like name@example.com</span>
<div id="status" aria-live="assertive" aria-atomic="true"></div>
</div>
<script>
document.getElementById('status').innerHTML = 'Saved.'; // read immediately
</script>
2.3. Securing Web Apps by @scottstender and @hillbrad
Scheduled as "Securing the Next Generation of Web Apps" (Brad Hill, PayPal; Scott Stender, iSEC Partners). Sourced to the day 2 minutes:
- OWASP Top 10 sorted into attacker-as-impersonator and attacker-as-client.
- Same-origin policy has held since the mid-1990s but was not built for apps that run mostly in the client.
- "mindedsecurity.com tested a sample of alexa top 1M and found 56% are susceptible to exploitable DOM XSS vulnerabilities." In DOM XSS the server never sees the payload, so server-side filtering cannot help.
- JSONP invites arbitrary code; use CORS, XHR2, Web Sockets.
- Content Security Policy as a least-privilege header. Code should be compartmentalized and testable: no inline script, no code from strings.
- Tools: DOMinator, DOM Snitch, WebDriver, Selenium.
2.3.1. History
1995 is the basis for much of the security review.
2.3.2. Hash exploit
Trivial example of
simple.html#alert(1)
eval(window.location.hash.split('#')[1])
Just a general case of loaders.
var views = { inbox: showInbox, settings: showSettings };
var key = window.location.hash.slice(1);
if (views.hasOwnProperty(key)) {
views[key]();
}
2.3.4. Testing / verification
2.3.5. <iframe seamless sandbox
<iframe sandbox="allow-scripts" src="http://widgets.example.net/feed.html"
width="300" height="200"></iframe>
X-Content-Security-Policy: allow 'self'; img-src *; script-src 'self' https://apis.example.com
Content-Security-Policy: default-src 'self'; img-src *; script-src 'self' https://apis.example.com
2.3.6. jqencoder
2.3.7. w3c
http://www.w3.org/2011/webappsec/
mario heiderich, gareth heys
2.4. Touch Events by @ggoodale
Scheduled as "Shortcuts: Touch Events" (Grant Goodale, Massively Fun). Sourced to the day 2 minutes:
- touchstart, touchmove, touchend, touchcancel, from iOS 2; touch objects carry identifier and client/page/screen X/Y.
- The W3C draft largely mirrors iOS. IE10 has a parallel model with different names that abstracts finger, pen and mouse.
- Disable pan, zoom and scroll where you take over; handle events in the animation loop rather than per event; fall back to single touch; handle both touch and mouse without processing twice.
var events = ["touchstart", "touchmove", "touchend", "touchcancel"];
document.querySelector('#log').innerHTML = 'events';
for (var event in events) {
document.querySelector('body').addEventListener(
events[event],
function(e) {
console.log(e);
}
);
}
var canvas = document.getElementById('pad');
var pending = {}; // drained in the rAF loop
function onTouch(e) {
e.preventDefault(); // no pan/zoom/scroll
for (var i = 0; i < e.changedTouches.length; i++) {
var t = e.changedTouches[i];
pending[t.identifier] = { x: t.pageX, y: t.pageY, type: e.type };
}
}
if ('ontouchstart' in window) {
['touchstart', 'touchmove', 'touchend', 'touchcancel'].forEach(function (type) {
canvas.addEventListener(type, onTouch, false);
});
} else if (window.navigator.msPointerEnabled) { // IE10
canvas.addEventListener('MSPointerDown', function (e) {
pending[e.pointerId] = { x: e.pageX, y: e.pageY, type: e.type };
}, false);
} else {
canvas.addEventListener('mousedown', function (e) {
pending.mouse = { x: e.pageX, y: e.pageY, type: e.type };
}, false);
}
2.5. HTML5 Gaming by @gskinner
Scheduled as "Hello. Games. HTML5 Gaming Today." (Grant Skinner). Sourced to the day 2 minutes:
- Built Pirates Love Daisies to show HTML5 could carry a Flash-class game.
- Loading: no real progress until XHR2; app cache is powerful but has no granular updates.
- Graphics: SVG/DOM ubiquitous but heavy; Canvas 2D an order of magnitude faster; WebGL fast and low level.
- Audio: format differences, one sound at a time on iOS; sound sprites; Web Audio as "a WebGL of the audio world".
- Input and devices: keyboard, mouse lock and fullscreen for shooters, touch, orientation. Network: XHR, Web Sockets, WebRTC.
- Tools: WebStorm, profilers, EaselJS; the Games Community Group.
2.5.1. Asset manifests and loading
No actual loading progress.
function load(url, onProgress, onDone) {
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = 'arraybuffer';
xhr.onprogress = function (e) {
if (e.lengthComputable) { onProgress(e.loaded / e.total); }
};
xhr.onload = function () { onDone(xhr.response); };
xhr.send();
}
2.5.2. UI
- three.js http://mrdoob.github.com/three.js/ (webgl) (moved; Wayback: https://web.archive.org/web/20111124200226/http://mrdoob.github.com/three.js/)
2.5.3. Sound
SoundJS, SoundManager2
2.5.5. JavaScript (ES5)
Recommend using strict at all times with freeze and seal.
(function () {
'use strict';
var raf = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function (cb) { return window.setTimeout(cb, 1000 / 60); };
var CONFIG = Object.freeze({ gravity: 0.4, maxSpeed: 12 });
var player = Object.seal({ x: 0, y: 0, vy: 0 });
function tick() {
player.vy = Math.min(player.vy + CONFIG.gravity, CONFIG.maxSpeed);
player.y += player.vy;
// player.z = 1; // TypeError in strict mode: object is sealed
raf(tick);
}
raf(tick);
}());
2.5.6. JavaScript tools
2.6. Modernizr by @kurafire
Scheduled as "Shortcuts: Modernizr" (Faruk Ateş). Sourced to the day 2 minutes:
- Modernizr reports features as booleans and as classes on
<html>; start withclass"no-js"=. - Fork in JS and CSS only where needed. Design for the browsers of the future: "three years ago you would have missed Chrome"; "Websites last a long time."
- End user-agent sniffing: easy to get wrong, almost impossible to get right.
- Modernizr does not add features, except the HTML5 shiv; performance matters more than pixel-identical rendering.
<html class="no-js">
<head>
<script src="modernizr-2.0.6.min.js"></script>
<style>
.cssgradients #hero { background-image: -webkit-linear-gradient(top, #fff, #ccc);
background-image: -moz-linear-gradient(top, #fff, #ccc); }
.no-cssgradients #hero { background: url(hero-bg.png) repeat-x; }
</style>
<script>
Modernizr.load({
test: Modernizr.geolocation,
nope: 'geo-polyfill.js',
complete: function () { initMap(); }
});
</script>
</head>
2.7. Browsers and Standards
Panel, "Browsers and Standards: Where the Rubber Hits the Road": Art Barstow (Nokia), Paul Cotton (Microsoft), Tantek Çelik (Mozilla), Charles McCathieNevile (Opera), Chris Wilson (Google), Peter Vosshall (Amazon). Sourced to the day 2 minutes:
- SPDY: encryption and full multiplexing without pipelining's problems; Cotton expected it could move to the IETF in 2012. Chaals on WebP: it will not replace JPEG given camera and editing investment.
- Tantek warned against "delayed open": technologies launched before any open discussion.
- Vendor prefixes: Cotton wants them until CR and a faster process; Tantek
pointed at
<video>shipping unprefixed; "Flash was the vendor prefix for video?" drew agreement. - Dart and Native Client are "not the ultimate end of languages" (Wilson).
- Privacy: Do Not Track work at W3C; Schepers noted the crypto API and identity work.
- How to help: file bugs, join Community Groups, read caniuse.com and MDN.
2.7.1. Browser release of new tech
- WEBP
- SPDY
- DART
2.7.2. Resources
- caniuse.com
- MDN
3. Outcomes
3.1. Dojo has IBM support for a11y
http://www-03.ibm.com/able/resources/dojo.html (dead, redirects to IBM Accessibility; Wayback: https://web.archive.org/web/20130115222539/http://www-03.ibm.com/able/resources/dojo.html) http://dojotoolkit.org/reference-guide/quickstart/writingWidgets/a11y.html (dead; Wayback: https://web.archive.org/web/20111114175427/http://dojotoolkit.org/reference-guide/quickstart/writingWidgets/a11y.html)
Use this as part of a comparison with Closure and YUI
http://code.google.com/p/closure-library/source/browse/trunk/closure/goog/dom/a11y.js?r=550 (Google Code is gone; Wayback: no snapshot found)
http://yaccessibilityblog.com/library/tag/yui (no longer answers; Wayback: https://web.archive.org/web/20111104041320/http://yaccessibilityblog.com/library/tag/yui)
3.2. Rich applications need to be mocked and validated in HTML for ARIA
http://dev.w3.org/html5/markup/aria/aria.html (410 Gone; Wayback: https://web.archive.org/web/20111128114417/http://dev.w3.org/html5/markup/aria/aria.html)
This isn't really a front-end considerations: plan for purely static implementation of core features that allow no Ajax functionality but includes metadata, link rel, ARIA.
3.3. Input sanitizing and validation would need to be built with RIA
Will need to build this internally if not using a library.
3.4. UI Toolkit Options
3.4.1. dependency managment
3.4.2. namespacing
3.4.3. inheritence management
3.4.4. widgets / ui patterns
3.4.5. accessibility
3.4.6. encoding
3.4.7. shims and polyfills
Progressive enhancement, graceful degredation.
3.4.8. model support
3.4.9. data binding
3.4.10. sockets support
3.4.11. local storage abstractions
3.4.12. cross-domain communication, CORS
WebRTC (http://www.webrtc.org/), postMessage,
// parent page
var frame = document.getElementById('widget').contentWindow;
frame.postMessage(JSON.stringify({ cmd: 'resize', h: 300 }),
'http://widgets.example.net');
// inside the widget
window.addEventListener('message', function (e) {
if (e.origin !== 'http://www.example.com') { return; } // always check
var msg = JSON.parse(e.data);
}, false);
3.5. Headers
http://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
Strict-Transport-Security: max-age=31536000; includeSubDomains
4. Revisited in 2026
Status as of October 2026, from the W3C publication histories (https://www.w3.org/standards/history/%3Cshortname%3E) unless noted.
- Testing
- testharness.js is still the harness, with the same two
<script src>lines, now under web-platform-tests: https://web-platform-tests.org/writing-tests/testharness.html - Web Payments
- The Web Payments Community Group was closed on 2020-12-18 (https://www.w3.org/community/webpayments/); its 2014 Web Payments Vocabulary still referenced PaySwarm. Payments on the web went a different way: the Payment Request API (Web Payments WG, FPWD 2016-04-21) became a Recommendation on 2022-09-08 and is a CR Draft as of 2026-06-22, https://www.w3.org/TR/payment-request/
- Flexbox
- Three syntaxes:
display: box(2009 WD),display: flexboxwithflex-pack(2011 WDs),display: flexwithjustify-content(2012 CR, https://www.w3.org/TR/2012/CR-css3-flexbox-20120918/). Never a REC; CR Draft 2025-10-14, https://www.w3.org/TR/css-flexbox-1/ - Grid
- The 2011
grid-columns/grid-rowssyntax is what IE10 shipped as-ms-grid. The spec was rewritten; first CR 2016-09-29, CR Draft 2025-03-26, https://www.w3.org/TR/css-grid-1/ - Regions, Exclusions
- Regions stopped at a Working Draft (last
2014-10-09); Exclusions likewise (last 2015-01-15). The wrap-around half
continues as CSS Shapes (
shape-outside; CR 2014-03-20, CR Draft 2025-06-12), https://www.w3.org/TR/css-shapes-1/ - Multicol, GCPM
- Multi-column is still a CR (2024-05-16), never a REC. Paged media (GCPM) is a Working Draft, last 2024-01-25.
- Web Audio
- FPWD a month after the conference (2011-12-15), Recommendation 2021-06-17, https://www.w3.org/TR/webaudio/
- Performance
- Navigation Timing REC 2012-12-17 (Level 2 succeeds it);
User Timing REC 2013-12-12, Level 3 CR Draft 2026-03-11; Performance
Timeline CR Draft 2024-02-16; Resource Timing CR Draft 2026-09-01. Page
Visibility reached REC in 2013; Level 2 was discontinued in 2022 and
visibilityState/visibilitychangeare now defined in the HTML Standard, https://html.spec.whatwg.org/multipage/interaction.html#page-visibility - AppCache
- Removed. Firefox deprecated it in 44 (2015), Safari in 2018, Chrome removed it in 85 (2020) with an origin trial to October 2021. https://web.dev/articles/appcache-removal
- Media queries
- Level 3 became a REC on 2012-06-19.
- Fonts
- WOFF 1.0 REC 2012-12-13; CSS Fonts Level 3 REC 2018-09-20.
- HTML5, Canvas
- HTML5 REC 2014-10-28, retired 2018-03-27; Canvas 2D Context REC 2015-11-19, retired 2021-01-28. Both now track the WHATWG HTML Standard.
- Accessibility
- WAI-ARIA 1.0 REC 2014-03-20, followed by 1.1 and 1.2 (https://www.w3.org/TR/wai-aria/).
- Security
- CSP 1.0 FPWD 2011-11-29, CR 2012, retired 2015; CSP Level 2 REC 2016-12-15; CSP Level 3 still a Working Draft. CORS REC 2014-01-16, retired 2020-06-02.
- Touch
- Touch Events REC 2013-10-10. IE10's MSPointer model became Pointer Events, REC 2015-02-24; Level 4 is a Working Draft.
- Games
- requestAnimationFrame's spec (Timing control for script-based animations) was retired in 2015; XMLHttpRequest Level 2 retired in 2014, folded into XMLHttpRequest.