This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23305 - Allow the lang attribute to parse Alt and Title attributes in the selected language
Summary: Allow the lang attribute to parse Alt and Title attributes in the selected la...
Status: RESOLVED INVALID
Alias: None
Product: HTML.next
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-20 15:18 UTC by Devarshi Pant
Modified: 2016-04-28 14:50 UTC (History)
5 users (show)

See Also:


Attachments

Description Devarshi Pant 2013-09-20 15:18:16 UTC
We often run into pages where the content in a specified language other than English is parsed correctly by assistive technologies, except the title and alt attributes.

-Devarshi
Comment 1 Ian 'Hixie' Hickson 2013-10-09 20:08:37 UTC
Why isn't this just a bug in the accessibility tools? I don't understand what the problem with the spec is here.
Comment 2 Devarshi Pant 2013-10-10 12:18:15 UTC
Would you agree with the statement that alt texts on images or tooltips on elements in pages authored in lang="fr" or "zh" etc., are actually seen / heard in English?
Comment 3 Jukka K. Korpela 2013-10-23 06:21:34 UTC
The first sentence at 3.2.5.3 (The lang and xml:lang attributes) is: “The lang attribute (in no namespace) specifies the primary language for the element's contents and for any of the element's attributes that contain text.” I think this clearly says that alt and title attributes are included. But I guess it would not hurt to append “such as the alt and title attributes” to the sentence.

It seems that the concept “attributes that contain text” is not defined anywhere but is to be understood intuitively. And it is not quite clear what it means. My intuitive interpretation was that it means any attribute with a value that can be regarded as being in a human language. But on second thought, I might be wrong. After all, class="nice little stuff" might be regarded as such an attribute, but that’s not what is meant, of course.

So maybe the attributes affected should be explicitly listed, or the definition of each attribute should specify whether its content is text (in the sense meant here, as opposite to allowing any string as value). What would they be, in addition to the obvious alt and title? Probably abbr, content (in some cases), label, placeholder, and some obsolete attributes. But maybe the value attribute, e.g. as in <input type=submit value="Subscribe">, should be included – it’s something that should be spellchecked, translated if the page is translated, and formatted using language-specific rules if relevant – and processed in speech synthesis as being in a specific language.
Comment 4 Devarshi Pant 2013-10-23 15:48:03 UTC
I think you meant 3.2.3.3 and not 3.2.5.3.
 
I tested a few pages (JAWS 13 / IE 10) with different language settings: Example -- http://fr.wikipedia.org/wiki/Wikip%C3%A9dia:Accueil_principal. 

Selecting a different language updates the title attributes and the alt texts in that language and screen reader processes it using proper phonetics. 

Jukka makes a valid point though, and I agree that the first sentence in 3.2.3.3 can be modified to include title attribute and alt text.
Comment 5 Charles McCathieNevile 2016-04-28 14:50:48 UTC
This is a bug in some implementations - and some get it right.