I thought title text improved accessibility. I was wrong.

David Ball has written a follow-up to his excellent article “Things I learned by pretending to be blind for a week“, where he discusses why title text is not as useful as we’ve been led to believe, and what to do about it. Please, if you haven’t already, go and read his article: “I thought title text improved accessibility. I was wrong.

Facebooktwittergoogle_plusredditlinkedinmailFacebooktwittergoogle_plusredditlinkedinmail

Safely encode dynamically-built HTML and JavaScript

If you build fragments of HTML and JavaScript dynamically from browser script, you need to take care to encode any special characters in your strings. Building your HTML using DOM createElement() and createTextNode() is often better, but sometimes the better solution is to generate a block of HTML. Here’s a couple of simple functions to do that, quickly. Continue reading Safely encode dynamically-built HTML and JavaScript

Facebooktwittergoogle_plusredditlinkedinmailFacebooktwittergoogle_plusredditlinkedinmail

Korpela’s guide to using special characters in HTML

Here’s a gem that just has to be widely disseminated. Jukka Korpela has written a nice guide to using special characters in HTML. I reckon it covers the problem pretty comprehensively, so rather than try to write one myself, I reckon everyone should check out his guide.

Facebooktwittergoogle_plusredditlinkedinmailFacebooktwittergoogle_plusredditlinkedinmail