RE: Question on <pre> and <code> - violation of 1.3.1?

I believe we generally present code examples by saying something like "in
the following example."

also most code samples open with the <head> element or the doc type
statement which is also a clear indication that it is code. 

 

But if it's a concern perhaps we need to check all the techniques to make
sure that is evident to screen readers that we are providing a code example.
Either by explicitly announcing it, or by opening examples with a common
element like the doctype statement.

 

David MacDonald

 

access empowers people...

        ...barriers disable them...

 

www.eramp.com

From: w3c-wai-gl-request@w3.org [mailto:w3c-wai-gl-request@w3.org] On Behalf
Of Andrew LaHart
Sent: Friday, September 05, 2008 9:56 AM
To: WCAG
Cc: Brian Cragun
Subject: Question on <pre> and <code> - violation of 1.3.1?

 

Good morning, 
Is the use of <pre> and <code> to distinguish code samples a violation of
1.3.1 in WCAG 2? The argument can be made that information is conveyed by
variations in presentation of text. 

For example, in the Techniques document, we use <code> inline in many places
without any other mechanism to determine that a code sample is present. Any
of the techniques pages can be used as an example of this, but here is one
in particular that wraps the describedby property in <code> tags:
http://www.w3.org/TR/2008/WD-WCAG20-TECHS-20080430/ARIA1.html

Screen reader users don't have access to this information, so should the use
of <pre> and <code> be cited as failures of G117 or H49? 

Any thoughts from the group would be most appreciated. 
Thank you!
Drew

Andrew LaHart
IBM Human Ability and Accessibility Center
www.ibm.com/able

Received on Friday, 5 September 2008 14:16:42 UTC