Log in   Register a New Account

Accessify Forum - Discuss Website Accessibility

New to the forum?

Only an email address is required.

Register Here

Already registered? Log In

<q> and screenreaders

Reply with quote Came across this in the latest ALA:
A List Apart wrote:
# Ceasing to use the Q tag altogether.

* Why? The Q tag is neccessary for semantic markup and for screen readers.
(from http://www.alistapart.com/articles/qtag)
And I thought "do what, John? Come again."

Is <q> necessary for screenreaders?

Jim O'Donnell
work: Royal Observatory Greenwich
play: eatyourgreens
Reply with quote I'm not entirely sure I follow, but...

I'm guessing that the q element is useful to screen readers in as much as for as semantics goes, but unsure how else it is necessary for them.

Bear in mind this was 2002/2003:
The reason that the q element was dumped was actually that Internet Explorer didn't support them and so when using JAWS with IE it didn't recognise the quote anyway - at least, there was no obvious audible difference. Instead, Mark Pilgrim used quote character entities for inline quotes.

And IE seemingly recognises the q element (or at least it seems to now), it doesn't render quote marks around it.

Gez has something recent on this:
http://juicystudio.com/article/fixing-ie-quotes.php
Reply with quote Cheers. Gez's article, like the ALA article, talks about how to make <q> work but doesn't explain why <q> is necessary in the first place. That's the bit that's confusing me.

I thought screenreaders were okay with quotes that are enclosed inside quotation marks, but I've no idea if that's right. I'm not sure what adding the <q> gains you, beyond the ability to style the quote differently from the rest of the text.
Quote:
“That rug really tied the room together.”

Jim O'Donnell
work: Royal Observatory Greenwich
play: eatyourgreens
Reply with quote
eatyourgreens wrote:
I thought screenreaders were okay with quotes that are enclosed inside quotation marks, but I've no idea if that's right. I'm not sure what adding the <q> gains you, beyond the ability to style the quote differently from the rest of the text.

To my mind, the advantage to screen readers is not a lot other than semantics.

The main problem is with the inconsistent rendering of q. The advice I've seen in the past is to just use quote marks. Screen readers should then read "quote blah blah (un)quote". If you want to style it, there's always span.

Disclaimer: I've not tested it, so I can't be sure myself.
Reply with quote
eatyourgreens wrote:
I'm not sure what adding the <q> gains you, beyond the ability to style the quote differently from the rest of the text.

Not everything contained within quotation marks is a "quote". Everything within a <q> is a quote. Not a great deal of semantic goodness accrues, but there you go.
Reply with quote
danchamp wrote:
eatyourgreens wrote:
I'm not sure what adding the <q> gains you, beyond the ability to style the quote differently from the rest of the text.

Not everything contained within quotation marks is a "quote". Everything within a <q> is a quote. Not a great deal of semantic goodness accrues, but there you go.

Fair enough, but what difference does that make to JAWS, say?

Jim O'Donnell
work: Royal Observatory Greenwich
play: eatyourgreens
Reply with quote
eatyourgreens wrote:
Fair enough, but what difference does that make to JAWS, say?


The q should allow JAWS to say "quote" and "unquote" - or at least give a pause.

A quick test with JAWS 7.10 with Firefox 1.5 and IE 6 gives the following results:

  • Using q sometimes results in a pause from JAWS, but there is no distinction from what is read when a q is encountered (it doesn't say "quote" or anything). Firefox renders it correct visually (even when nested) while Internet Explorer doesn't render anything.
  • Using straight quote characters (") or the entities &# 8220; and &# 8221; (in other words, without the q tags) results in JAWS saying "quote" before and after the text quoted in both Firefox and Interner Explorer.

So the answer is:
JAWS doesn't seem to give a monkeys about the q element, although, sometimes (for some reason I haven't figured out yet) it does pause whereas it does not when using quote characters.

Using q elements might provide some structure when you quote someone quoting someone else. W3C give the example:
Quote:
John said, <Q lang="en-us">I saw Lucy at lunch, she told me
<Q lang="en-us">Mary wants you
to get some ice cream on your way home.</Q> I think I will get
some at Ben and Jerry's, on Gloucester Road.</Q>
Reply with quote Thanks, that's useful. I didn't know you could nest <q> like that. The Economist style guide has some examples of fairly tortuous use of speech marks.

Odd that JAWS says "quote" … "quote" rather than "quote" … "unquote" for text in quotation marks.

So if you have to use <q> is it better to use
Code:
<q>“That rug really tied the room together.”</q>

or
Code:
“<q>That rug really tied the room together.</q>”

I'd suspect the second, since the speech marks aren't part of the quoted text. Just not sure that I've basically marked up a quote inside a quote by accident.

Jim O'Donnell
work: Royal Observatory Greenwich
play: eatyourgreens
Reply with quote Jim, the problem with your examples is that browsers should render the q element with quotes for you.

W3C wrote:
Visual user agents must ensure that the content of the Q element is rendered with delimiting quotation marks. Authors should not put quotation marks at the beginning and end of the content of a Q element.


Most browsers that aren't IE will do this. So if you use both the q tags and quote characters, chances are you are going to get twice as many quote marks as you want when rendered visually. Of course, the fact remains that JAWS doesn't seem to want to read quote marks when they are rendered for you by the browser.

Hence, Gez's solution that I mentioned above, may actually fix this for IE, but not any other browser which renders the delimiting quotation marks for you, as JAWS doesn't seem to know they are there.

Personally, I'll continue to use the numeric character entities on their own for now.
Reply with quote
dotjay wrote:
Jim, the problem with your examples is that browsers should render the q element with quotes for you.

Yeah, my comment on the ALA article was to the effect of - this is silly, why replace perfectly good punctuation with HTML/CSS.

The XHTML 1.1 (or 2) spec, I think, reverses this, which makes more sense to me. But then I wonder why have the <q> tag and the speech marks. Does that make the quote double extra special to screenreaders?

The problem I have with CSS-based solutions for <q> is that CSS is for decoration and layout. As soon as you start using CSS to add/remove punctuation from a document, you're using it to edit the content. I think that's very dangerous.

I also think sticking the display of punctuation into the UA is just mad. As someone else points out, we don't reformat exclamations or questions to handle punctuation from other languages eg. Spanish exclamation marks.

Jim O'Donnell
work: Royal Observatory Greenwich
play: eatyourgreens
Reply with quote The design of <q> is very silly, which is why almost everyone who has heard of it chooses not to use it. As everyone knows, punctuation is as much a part of the content as the letters.

For example, the </p> tag. This doesn't require we ommit the terminal punctuation for paragraphs so UAs can render it for us. It doesn't require that this punctuation can only altered through CSS content-generation either. Yet the <q> element does.

Having <q> tags and speechmarks makes sense in the same way that having </p> and full stops does. I think the punctuation should probably be on the outside so you can do this:
Code:
<p>"<q>Well</q>," she said, "<q>what are '<q>we</q>' to do?</q>"</p>
Where the alternative would be:
Code:
<p><q>"Well,"</q> she said, <q>"what are <q>'we'</q> to do?"</q></p>
Although it's a tough call, because quotation punctuation is weird and differs between languages.

As far as I know, the comment about <q> being necessary for "screen readers" (i.e. all of them) is false. It's probably useful in any screen readers which support it, but that hardly makes it necessary.
Reply with quote Basically, I agree with you, Jim. I think there is value to having a q element (semantics), it's just a shame it seemingly wasn't thought out properly. I'm guessing that the idea behind leaving the rendering of punctuation up to the browser was to somehow ensure correct rendering, e.g. single quote marks for quotes inside quotes.

I'll reiterate my approach though:
dotjay checkpoint Q.101 - "Until user agents stop trying to render puncuation for us, use quote characters in favour of the q element."
Reply with quote
dotjay wrote:
I'm guessing that the idea behind leaving the rendering of punctuation up to the browser was to somehow ensure correct rendering, e.g. single quote marks for quotes inside quotes.

I'm sure I read somewhere that there was an internationalisation issue too - something about the characters used for delimiting quotes being different depending on the language. Can anyone confirm that, or did I dream it?
Reply with quote
danchamp wrote:
dotjay wrote:
I'm guessing that the idea behind leaving the rendering of punctuation up to the browser was to somehow ensure correct rendering, e.g. single quote marks for quotes inside quotes.

I'm sure I read somewhere that there was an internationalisation issue too - something about the characters used for delimiting quotes being different depending on the language. Can anyone confirm that, or did I dream it?

No, that's exactly right. Joe Clark refers to it in his bit about quotations.

The thing is, lots of other punctuation varies from language to langauge. Questions in Spanish, for example. So why are quotes special? And isn't the punctuation governed by the context, not the language of the quote?

Jim O'Donnell
work: Royal Observatory Greenwich
play: eatyourgreens
Reply with quote
danchamp wrote:
I'm sure I read somewhere that there was an internationalisation issue too - something about the characters used for delimiting quotes being different depending on the language. Can anyone confirm that, or did I dream it?

It's a valid point, but one that could still be solved using the correct characters. For example, quotes in Spanish should render different glyphs for the punctuation. The question is still, why leave that up to the user agent?

More on quotation mark glyphs.

Display posts from previous:   

Page 1 of 2

Goto page 1, 2  Next

All times are GMT

  • Reply to topic
  • Post new topic