Accessibilty for content providers - quotes
Unfortunately the underlying technology used in most WYSIWYG editors makes it very easy to fall foul of these accessibility rules. The problem is the Indent button. It works fine if you use it on a list - making the list item that you’ve highlighted move in a level - but if you apply it to a paragraph then it will mark it up as a quote. That’s because the normal styling applied to a quote by your browser is to indent the text.
The relevant WCAG 1 checkpoint is:
3.7 Mark up quotations. Do not use quotation markup for formatting effects such as indentation.
It’s a Priority 2 requirement, so is necessary for Double-A compliance.
Don’t indent with <blockquote>
So the first thing is probably to put some test content into your WYSIWYG editor and try the Indent button. Then look at the HTML code produced to see if it uses <blockquote>. If that is that case then you should only use that button for indenting lists.
The best alternative is to have an indent style added to your stylesheets and for that to be available as an option in your editor. Then you just have to highlight the text and select the style.
The next stop down is to have the style in your stylesheet but you have to go into the HTML code to say where you want to use it. Finally you can use the style attribute to put the formatting in directly.
In both cases you need to find the tag that surrounds the block of text that you want to indent. This is usually going to be a paragraph so you’re looking for <p>. If you’re armed with a class name from your stylesheet, say ‘indented’, then you want to change it to <p class=”indented”>, otherwise you’ll use something like <p style=”margin-left: 20px;”>.
Do mark up quotations
There are two relevant HTML tags - <blockquote> for blocks of text and <q> when it’s part of a block of text (i.e. a phrase within a sentence, etc.). You don’t need to go overboard though and mark up absolutely every piece of speech in your content.
If your normal browser is Internet Explorer and you’ve been using <q> in your content then you might be surprised by additional speech marks appearing in other browsers. Don’t worry that’s just the default behaviour. Internet Explorer (including IE7) doesn’t understand the tag so there’s no styling applied, some other browsers do and wrap the text up in speech marks. The best solution if you see this is to get your web team to remove this behaviour in the stylesheet so that it looks the same for everyone.
Don’t worry about "
In your journeys through HTML you might have come across this strange notation, which looks like it’s something to do with quotes. It isn’t, so you can ignore it (or remain in your current blissful state).
It’s just used in the HTML code if you need a speech mark within, for example, alt text. The same character is used to enclose the alt text, so this is the route out of the potential confusion of speech marks inside speech marks. Your WYSIWYG editor should take care of these details for you though - you will still enter the ‘”‘ character in the dialog box.
Summary
- avoid using the Indent button if your editor converts it into the <blockquote> tag
- alternatively add a class (if it has been defined in your stylesheet) to the paragraph tag, or the style attribute (e.g. <p style=”margin-left: 20px”> …</p>)
- <blockquote> is for marking up blocks of text
- <q> is if you have a quote within a block of text
- some browsers wrap text marked with <q> in speech marks, Internet Explorer doesn’t – have them removed in your stylesheet for consistency
- don’t worry about "
March 2nd, 2007 at 8:30 pm
HTML quotations are a minor obsession of mine. The HTML standard is entirely clear that: “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.” The vast majority of UAs get this right. There are two main ways of dealing with IE’s failure to generate quotation marks:
1. Insert quotation marks around Q with conditional comments (or, possibly, conditional compilation) targeted at IE 7 or less. In the unlikely event a user has configured JAWS to read quotation punctuation or read quotations in a special voice, this will help them. On the other hand, it will hurt Window-Eyes users who have told their screen reader to announce quotations and to read quotation punctuation, since quotations will be announced twice.
2. Forget about punctuating Q and just style it italic in IE. Because JAWS 7 (not sure about 8) doesn’t actually notice Q, this will fail miserably for JAWS users. But it rewards Window-Eyes for getting it right and announcing Q.
Inserting superfluous quotation marks around Q in all browsers is a non-solution since it actively reduces accessibility. Users who have CSS disabled or unavailable will see doubled quotation marks; and good screen readers will end up double-announcing quotations even in superior browsers like Firefox. And since it ignores the actual spec for Q, it arguably fails to comply with the guideline anyhow.
PS It would be nice to know what sort of markup or markdown this comment box accepts.