Archive for November, 2004

Mediaelements presentation: Web Standards Redesign A.B.C.

My mediaelements presentations Web Standards Redesign A.B.C. (and the cancelled one Accessibility – who gives a shit?) are available for download. Sorry it took so long; I find Acrobat to be a fucker to work with (though I saw a sneak preview of Acrobat 7, which looks to be much more intuitive). Hope it helps.

To Web Standards wonks who may come here, yes I know that it isn’t perfectly accessible or cross-browser; my aim was to show, in one hour, why accessibility matters and why CSS can work for existing sites and in IE, so the emphasis is on simplicity, awareness-raising and process.

(Last Updated on 10 May 2005)

CSS/ xhtml: does validation matter?

“In a code-shop version of Guantanemo Bay, validation failures are assumed guilty until they can prove their innocence.”

One of the questions I was asked at the mediaelements conference was by a guy who’d read my tirade against the invalidity of embedding Flash. The question was "Does validation matter?". It’s a question that is being discussed a lot lately, and I pitched in with my unfashionable opinion.

Validation is important as a step to making your sites work, but it’s not the be-all and the end-all. If I were running a team, for example, I would require full xhtml and css validation as part of the acceptance process, unless there was justification for accepting invalid code. In a sort of code-shop version of Guantanemo Bay, validation failures are assumed guilty until they can prove their innocence.

The only acceptable defences would be:

  • Correcting Internet Explorer’s broken keyboard navigation by adding the invalid attribute tabindex="-1" on headings etc that are the target for in-page links to correct IE’s broken keyboard navigation.

  • The need to <embed> Flash into a page. The Flash Satay method of creating a very small container movie, in which the first frame loads in the real movie we want to play, is a testament to Drew Mclellan’s genius, but seems less elegant to me than letting an invalid page go live (and plus, I don’t know enough about Flash to do this!). This is the only circumstance I can see for allowing an invalid xhtml file to go through.

    Additionally, Andrew Kirkpatrick of the National Center for Accessible Media writes that Flash Satay renders the entire Flash movie inaccessible to JAWS.

    (Update, June 05) Patrick Lauke has found a Firefox and Flash Satay bug: flash content embedded this way swallows the tab focus, making it impossible to proceed beyond the movie when using keyboard navigation.

  • The need for non-contiguous list numbering in xhtml. (You might think that this is an arcane example, but I’ve needed to do it twice in two months.

  • The need to hover over anything in IE. Using the microsoft-only property behavior on the body selector, thus: body {behavior: csshover.htc;} and offering the IE behavior file csshover.htc allows you to fix the fact that IE only allows the hover pseudoclass on links, instead of any element as the CSS spec allows. This solution allows drop-down menus without JavaScript and introduces one validation error to fix poor old broken IE, and therefore allows you to make semantic lists and turn them into sexy menus with CSS. What’s not to love, Mr PuristPants?

  • The need for user-friendly print stylesheets. I like to make print stylesheets, and because (like everyone else) the majority of my clients’ audiences use IE, there’s an extra lovely bonus I can offer them. If I define all images in the print stylesheet to use an MS-only filter, we can protect poor Mr and Mrs Public from using endless quantities of hyper-expensive colour ink cartridges by automatically making all images grey-scale: img {filter: gray();} Again, what’s not to love about that? (As an aside, is this the only time when IE users get a better experience?)

  • Make pages cross-browser. Many hacks – including the box model hack – seem to upset the validator. But then, of course, we need these hacks. (More’s the pity).

    Lachlan Hunt wrote to point out that I’ve made a mistake. For a time, the CSS validator flagged the box model hack as an error, but the validator was wrong and it’s fixed now. (D’oh!)

Now, obviously, your mileage my vary, but I consider that these real-world examples justify ignoring validation errors. Any other times, documents should validate. I always bear in mind that clients increasingly demand accessibility, the ability to render on PDAs, mobiles, and reduced download time and bandwidth bills – and these are all products of using xhtml and css. But no client has ever demanded that the pages validate – itself a sign that validation is a means rather than an end. Do, of course, flame me.

Anyway, validity and accessibility by no means guarantee a good page, as my work-in-progress submission to the CSS Zen Garden, Geocities 1996, demonstrates.

(References: Mozilla CSS extensions, Microsoft filters).

(Last Updated on 23 September 2008)

CSS utility wishlist

I hate having to think about stinky old IE and other browsers’ mangling of CSS and shouldn’t have to. I also can’t keep the myriad CSS hacks in my head for love or money, and shouldn’t have to.

So, wouldn’t it be great if there were a small program or Dreamweaver extension that will troll through your cross-browser, valid CSS once you’ve made your pages and verified their loveliness in Firefox, and then it would calculate and add the necessary IE box model hacks, be nice to Opera rules blah blah. Mostly, it’s a mechanical task that in no way involves creativity – only memory – and is thus ideally suited to a machine.

While we’re at it, wouldn’t it be great if the program also trawled through your page/ site and told you which CSS rules exist but are never applied. Great when you’re updating a site that you didn’t write.

And, what about if it could (optionally) intelligently combine rules to shrink the file. (I say optionally, as sometimes you want maximum readability at the expense of smaller files).

I’ve written to George Petrov, extension guru at DMXzone to request it, but don’t know if there’s a big enough market for a commercial Dreamweaver extension. Anyone know of such a utility? Do let me know!

(Last Updated on 10 May 2005)

MediaElements Conference

cast of media elements,Twente, HollandI love Holland – it’s the nearest place to the UK that you feel you’re in Europe. OK, so there’s France, and I love Paris, but it always seems to me to be a Gauloise-scented Jean-Paul Satre museum, with its carefully curated skyline. Holland is a place where people like Lisa and Aldrick live; people who speak 6 languages, travel Holland, France, Spain, Bulgaria with equal ease and the equal feeling of being at home anywhere in the continent.

So it was with great delight that I went to speak on accessibility and web standards at mediaelements in Enschede. The hotel and hospitality was great, and the other speakers were coolness personified; Ola Bergner, Guy Watson, Sam Wan, Shane Tanner, Craig Swann, Billy Bussey, Keith Peters, Danny Franzreb, Sas Jacobs, Rob Chiu … Everyone got along well, which is great when you’re a long way from home and in each others’ pockets. We had a billion beers together at the Dancelements party (where I shook hands with a robot), congratulated each other over our sessions, swapped coding war stories and travelled around the Twente district of Holland in a hospitality bus the day after the conference.

And the conference itself? A couple of minor technical hiccups, a good crowd and I did a video interview for some glam Dutch students, and all was fine. I got pretty nervous, having never spoken at length before, and was rather worried that my rather dry and corporate presentation about separating structure and presentation with web standards would be pretty dull compared with sessions on Ola’s new film, Craig’s crazy sounds, or Keith’s funky maths. But the talk went well; twenty minutes of really probing questions at the end and a gratifyingly warm reception for my talk.

Feel free to download the zipped up pdfs of the powerpoint presentations. (yeah, yeah, pdf and powerpoint from a standards geek. So sue me). Feel even freer to send me money or pictures of yourself in a state of undress.

And thanks to all who came to watch me, all the other speakers who were veteran speakers and gave me encouragement, and to the organisers. At the top is a picture (taken by Lisa Petrova) of some of the cast at Twickle Castle in Holland. See you next year!

(Last Updated on 10 May 2005)

On birthdays past and present

It’s my thirty-eighth birthday, and I’m in Holland without the family, though had a really great time. You’d think that being of such advanced years, I’d recall many past birthdays, but only a few stick in my mind. Most notably, these were:

  • 13/11/82: my sixteenth: I got laid. By a red-head.
  • 13/11/84: my eighteenth: likewise, by Helen, of the fabulous figure.
  • 13/11/87: my twenty-first, at university in Hull, when my brother and best mate Matt came to visit and we tried to drink 21 beers that day. I believe we succeeded, although were not pretty sights. I certainly recall proposing marriage in a crowded bar to a gorgeous Indian woman named Dhillum with the best breasts I had ever seen. She declined with a good deal more politeness than I deserved, give that we’d never spoken before, and I was slurring my words so much it took three attempts before any degree of coherence could be achieved.
  • 13/11/91: my twenty-fifth when I woke up next to the barmaid from my local pub, and the listened to one of my presents: a CD of My Bloody Valentine’s "Loveless", one of my all-time top 5 albums.
  • 13/11/93: in Istanbul, with Lucy, Yeşim and other colleagues. That night, I met Zeynab, my first muslim girlfriend, who was so gorgeous and intelligent she was breathtaking.
  • 13/11/94: (See photo) In India, on the roof of a hostel in Sudder Street, Calcutta, smoking giggly weed and drinking Rosy Pelican beer. (I always swore I’d call a daughter of mine Rosy Pelican Lawson, but Nongyow vetoed that.)
  • 13/11/95: in London: seduced by The Big Boss’s secretary, 10 years older than me and a busty Mauritian hindu. Hurrah!
  • 13/11/96: in Bangkok; my first birthday with Nongyow and having recently had my diagnosis of a brain tumour retracted (though the next year revised to MS). Nongyow, me, Stephanie and Richie went to an enormous restaurant where the waiters came round on roller skates, and we gorged ourselves on seafood and Thai curry.

This birthday, on a trip round the Twente district of Holland with cool people, beer and some weed has proved pretty cool, too.

On top of a Calcutta hostel, stoned, on my 28th birthday

(Last Updated on 13 November 2005)

To America, with deepest sympathy

Map of USA, in mourning blackSo, you’ve re-elected a witless, inarticulate president who executes juveniles and the mentally handicapped and incarcerates people without trial. A man whose repulsive colleagues believe things like unmarried pregnant women and gays should not be teachers, or that abortionists should get the death penalty. A man whose base is the Jesus-fellating Evangelicals who love Governments that poke their noses into all aspects of life.

Osama Bin Laden and others like him who hate social liberalism, a secular rule of law and the separation of religion and state must be pissing in their pants with laughter. They don’t need to bomb you into submission; you’re voluntarily becoming like them.

Postscript 16 Nov:

After meeting all those lovely yanks at mediaelements, I don’t want to do them a disservice, so I should point out that 49% of the Divided States of America didn’t vote for Dubya, as illustrated on SorryEverbody.com.

(Last Updated on 10 May 2005)