A LIST Apart: For People Who Make Websites

No. 224

Discuss: Long Live the Q Tag

Pages

« First  <  5 6 7 8 9 >  Last »

61 Untitled

Does anyone know of any browser, application or utility that actually makes use of the <q> markup?

My tests that Jim linked to are very simple. I haven’t yet had time to investigate further. However, it seems that the <q> element may be available to assistive software (suggested by the occasional pause in reading), but JAWS 7.10 doesn’t make use of the element. If that’s the case, then other screen readers may have better implementations – I may get time to test this later. However, if the browser doesn’t make <q> elements available to assistive software (in the same way that IE doesn’t support <abbr>) I don’t hold much hope for other screen readers.

It seems to me that if the XHTML2 spec requires that UAs not add quotes to <q> tagged content, and screenreaders ignore the tag, then the tag serves no purpose and we should be using quotes in our source code exclusively.

The idea behind <q> is to add meaning and a neutral one that can be interpreted correctly by the user agent depending on context. For example, different glyphs are used in different languages for delimiting quotations.

We’re talking about punctuation though. Typographically speaking, I just cannot understand the decision to allow user agents control over the punctuation. We don’t do that for full stops at the end of paragraphs, do we?

In his book, Joe Clark gives an example where there’s a French quote in the middle of an English sentence (although I’m not sure I’d even use <q> there). The fact is that the sentence is English, so you would hope for English glyphs, not French ones.

My current approach is to just use quote characters in favour of the <q> element. At least until I’m satisfied with an approach which stops user agents doubling up the quotation marks I use.

posted at 02:40 pm on September 28, 2006 by Jon Gibbins

62

Jim Dalton said:

Chris Botman points out the XHTML2 specs for the <q> element. These specs are obviously not set in stone, but shouldn’t we keep an eye toward them for forward compatibility?

XHTML 1.x is not forward-compatible with XHTML 2. This is by design of the W3C working group that is creating XHTML 2.

If the W3C were to announce a more compatible “next step” markup language, it would not be called XHTML 2 and would have little to do with that spec.

posted at 03:52 pm on September 28, 2006 by Jeffrey Zeldman

63 Following up my own comment

As a follow up to my own comment (#31) I feel I should remark on what I am doing currently. My current style sheet lets most browsers do their thing, since Firefox/Opera/etc. seem to be doing a decent job in my opinion. I then have a conditional comment that applies an IE only style sheet that italicies the text, shrinks the font to 90% of whatever it currently is (hence to differentiate between quotes in already italicized elements), and I apply a behaviour (which will of course only run if JavaScript is enabled). The behavior I am using is a modified version of Simon Willson’s method of fixing quotes, but in doing so I have it also apply some styling that undoes the italicizing and brings the font size back to 100%. I’m currently thinking about removing either the rule that sets the italics, or removign the rule that removes the italics if JavaScript is enabled, but I have not yet come to a conclusion.

posted at 05:22 pm on September 28, 2006 by Brian LePore

64 Clarification

IE6 and 7 do support the Q tag. They do not add quotation marks to it, but they do recognise it as markup. So you can still style quotes in a different colour. It’s just that the level of support differs from other browsers. Perhaps we need to be clear about this, as readers might think IE doesn’t support the tag at all from what is written here.

posted at 05:51 pm on September 28, 2006 by Chris Hester

65 I love single letter tags

The more, the merrier!

posted at 06:06 pm on September 28, 2006 by Dallas Ransom

66

Yeah. As you will enjoy it when your car mechanic calls tyres “the things at the bottom of the car�, right? “Q tag� (above all, in the headline, @John) is just false, and neither “conversation style� nor “anyone passionate� will change that. Sorry. (No, I’m not, but it sounds polite.)

Hmm. I’ve already agreed with you that the correct term is, in fact, “element.” You disagree with our editorial call — and that’s perfectly OK — but this degree of hostility’s a bit uncalled for.

posted at 08:43 pm on September 28, 2006 by Erin Kissane

67

My tests that Jim linked to are very simple. I haven’t yet had time to investigate further. However, it seems that the <q> element may be available to assistive software (suggested by the occasional pause in reading), but JAWS 7.10 doesn’t make use of the element. If that’s the case, then other screen readers may have better implementations – I may get time to test this later.

Jim and Jon, many thanks for bringing this data to the discussion.

posted at 08:48 pm on September 28, 2006 by Erin Kissane

68 Re: Re: Re: Q Tag

but this degree of hostility’s a bit uncalled for.

It wasn’t meant to be hostile, just precise. No offense.

posted at 11:39 pm on September 28, 2006 by Jens Meiert

69 Why not Javascript?

I’d just like to comment that I think that using Javascript is much better than turning off the default styling of quotes and adding the entities manually. A couple of posters have suggested a three-pronged attack:

  1. rely on the default rendering of quotes in standards-compliant browsers;
  2. include a stylesheet which targets IE 7 and below, using conditional comments, to make quotes more obvious (eg. italics, a stylised quotation mark graphic at the beginning, different colour; there are plenty of possibilities)
  1. finally, include a script which will only run in IE 7 et al. which adds smart quotes and removes the special styling by adding a class defined in the aforementioned stylesheet.

This strategy should fix the problem beautifully for most configurations, except when an IE user turns off Javascript, in which case quotes are at least visible and distinguishable. In fact, this is precisely the solution I have implemented for a recent website, and will continue to use in the future. The overwhelming majority of users (not to mention content authors) will benefit from what I consider to be the main boons of the <q> tag:

  • smart quotes and automatic quote nesting, removing the need to keep track of quotes mentally when writing;
  • different quotes and nesting rules for different languages;
  • clean, logical markup.

Trying to do all of this manually is a pain; it’s much easier to define once what sort of rules to apply to quotes in given languages, and henceforth allow the browser to apply them. All the author of a document needs to deal with is tagging their quotes and optionally specifying a language. In my opinion, this is the embodiment of all that’s good about markup and generated content; actually putting the quotes in the markup makes about as much sense as putting a bullet at the beginning of an unordered list item, or numbering your ordered list items manually.

And while I love so much of the stuff which XHTML 2 will bring in, I don’t think that the decision to make authors manually insert quote marks is a good one—especially since any future user agents which parse XHTML 2 are likely to have far more standards compliant than the current offerings.

Finally, can I just congratulate Ian Oxley on an extremely inventive solution. For the reasons stated above, I wouldn’t use it (not to mention that it isn’t terribly attractive); however, it is the first pure, valid markup solution I have seen which will work perfectly in almost every user agent in current use—except for IE 4 and maybe Netscape browsers, but who uses those?—without relying on server-side scripting. Very original, I’m impressed!

posted at 01:26 am on September 29, 2006 by Jordan Gray

70 What the—

Can I just ask what the heck happened to the first few lines of my posting? Apparently Textile decided not to make it a paragraph!

Would an editor mind fixing this for me? The preview script gave no indication of this.

posted at 01:28 am on September 29, 2006 by Jordan Gray

Pages

« First  <  5 6 7 8 9 >  Last »

Discussion Closed

New comments are not being accepted, but you are welcome to explore what people said before we closed the door.

Got something to say?

Discuss this article. We reserve the right to delete flames, trolls, and wood nymphs.

Create a new account or sign in below if you’d like to leave a comment.

Remember me

Forgot your password?

Subscribe to this article's comments: RSS (what’s this?)