WCAG and code fragments
Hello,
I was using the power mapper / sortsite tool to evaluate some of my pages. since those are mostly related to coding in PL/SQL programming language, there are large portions of computer code.
I don't want to use <code> tag, as I would like to improve readibility of the code by highligthing keywords etc. However this leads to the problem of recognizing computer code as in violation of WCAG2 A F71 (This page has words made of Unicode characters that look like English characters but are from another alphabet. This means screen readers are unable to pronounce these words.)
So my question is: Is there a way to mark the code (without using <code> tag) so it would pass the inspection?
Example of my page:
http://marcin.jankowski.com/oracle/pipelined-function-example.html
I was using the power mapper / sortsite tool to evaluate some of my pages. since those are mostly related to coding in PL/SQL programming language, there are large portions of computer code.
I don't want to use <code> tag, as I would like to improve readibility of the code by highligthing keywords etc. However this leads to the problem of recognizing computer code as in violation of WCAG2 A F71 (This page has words made of Unicode characters that look like English characters but are from another alphabet. This means screen readers are unable to pronounce these words.)
So my question is: Is there a way to mark the code (without using <code> tag) so it would pass the inspection?
Example of my page:
http://marcin.jankowski.com/oracle/pipelined-function-example.html
Can you not just use the
element and give it a class?
Design, development and marketing for the web.
Edge Three Sixty Ltd: Web Design Liverpool
| Code: |
| <span> |
Design, development and marketing for the web.
Edge Three Sixty Ltd: Web Design Liverpool
Semantically you should use the code element.
Visually there's nothing to stop you putting spans around code content.
Take a look at this Javascript syntax highlighter
Paste in a little JavaScript and see how the code tag is styled for syntax.
Mike Foskett
<marquee><blink><work> webSemantics </work><rest> 2kool2 </rest> & <play> bangers & mashed </play></marquee></blink>
Visually there's nothing to stop you putting spans around code content.
Take a look at this Javascript syntax highlighter
Paste in a little JavaScript and see how the code tag is styled for syntax.
Mike Foskett
<marquee><blink><work> webSemantics </work><rest> 2kool2 </rest> & <play> bangers & mashed </play></marquee></blink>


