Slashdot: Smart Quotes poll. My article on the Q tag is mentioned in the comments as an example of how to get smart quotes with proper markup. Ironically, I just retired my use of the Q tag. Well, technically I’m still using them, but I added a global regular expression to automatically convert them into the appropriate HTML entities when I publish a post (similar to how I get automatic curly apostrophes).
The deciding factor was Internet Explorer for Windows, which doesn’t support the Q tag at all. Specifically, the fact that JAWS, the leading screen reader, sits on top of Internet Explorer for Windows, so blind readers will have no audible indication where a Q-tag-marked quote begins or ends, or even that the text is a quote at all.
Don’t use the Q tag; it’s an accessibility problem. Please note that this advice directly contradicts checkpoint 3.7 of the Web Content Accessibility Guidelines, which states in no uncertain terms to use the Q tag to mark up short quotations. Good advice in theory; falls short in practice. Blame Microsoft, and recognize that the WCAG is not scripture. Proper markup does not always enhance accessibility. Mostly it does, but not this time.
And no, using both manual quotes and the Q tag is not the answer. This will give you two sets of quotes in browsers that support the Q tag but don’t support stylesheets (or have them disabled). Lynx, for example. Besides, this violates the HTML specification of the Q tag, which explicitly states that authors should not put quotation marks at the beginning and end of the content of a Q element.
It’s a no-win. Screw Q. It’s not worth it.
Meanwhile, if you want to get curly quotes and don’t feel like typing HTML entities all the time, you should probably use Brad Choate’s new MT-macros plugin, which gives Movable Type users an incredibly flexible system of macro substitutions. You can have simple macros (one string gets substituted for another), or regular expression macros (completely replacing the functionality of the MT-regex plugin that I’m currently using), or container macros that allow you to create behaviors for new tags (like tag libraries in JSP). This looks like the easiest way to automatically turn quotes curly. Stay tuned for details.
§
I am no longer accepting public comments on this post, but you can use this form to contact me privately. (Your message will not be published.)
§
© 2001–9 Mark Pilgrim