Repository navigation
Are programming languages human languages? #5368
|
I have been wondering about whether programming languages are considered human languages and therefore text if they are presented as web page content. The definition of text appears to require that it express something in human language, with the definition of human language reading 'language that is spoken, written or signed (through visual or tactile means) to communicate with humans'. You might be able to say that higher-level languages are for communicating with humans, but would this apply to lower-level languages (such as machine code) as well? Not considering programming languages to be human languages/text seems a bit awkward. For example, you might need to provide a text alternative to the programming language. Also, there might be no contrast requirement as the characters representing the programming language would not cleanly fit under contrast (minimum), even though they could be important to the understanding of the page. On the other hand, considering them human languages could be difficult for language of parts, as I don't think there are language tags for them. It looks like you could solve this by finding another way to make the language programmatically determinable, or by considering them to be 'technical terms' which are excepted from language of parts. Any advice would be appreciated. |
Replies: 2 comments 5 replies
|
programming languages are not considered human languages. Those are languages used by people to communicate with each other. best |
|
My thoughts / rememberances Natural language and human language in WCAG do not have two different meanings. We have used them both at different times. also - we should not confused languages with text
programming languages and babble that appear visibly on the page - are text. And all text should be programmatically determinable. but programming that is code that is executed as part of the page - and not visible - is not text - it is code. unless and until the code is displayed on screen for the person to read-- then it is text. So blanket statements about code or programming languages -- are usually incomplete and inaccurate. Agree with Patrick we should tweak the definitions of text and human language to make them clear -- and add notes to explain that code that is executed on a page is not text but code that is displayed on a page is. ALSO we need to double check our use of "text"
we should be careful of this. my comments are more for WCAG3 - than WCAG2 since that one has sailed and changing definitions is dangerous or should not be done unless we are talking about a 2.3 -- but that I think is a bad idea at this point (though that is another discussion - not this thread) |
in practice, auditors/developers have always treated
<code>etc blocks as actual text with regards to contrast requirements. this is, as ever, one of those weird unforeseen consequences of some of the (old) WCAG definitions, and i'd suggest not relying on a thinslicing of the normative wording to make the case that "no, in fact, my example code blocks or inline code bits don't need to have 4.5:1 ratio"