WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Best practice for language markup


From: Peter Weil
Date: Jul 25, 2022 8:24PM


I would probably use the lang attribute in your case. Why? Transliterated words are still “in” their original language; but they are written in the Latin alphabet. That's what transliteration is. The purpose or value of transliteration is to make non-English words pronounceable to readers who are unfamiliar with the original (non-Latin) alphabet. Since one of the main purposes of the lang attribute is for better pronunciation, I would use it in this case, or at least test it. Which way is pronounced more accurately? With or without the lang attribute? Will the screen reader freak out because there is no Japanese alphabet to read, or will it attempt to read the word as if it were in Japanese, regardless of the alphabet?


> On Jul 25, 2022, at 8:11 PM, Murray Inman < <EMAIL REMOVED> > wrote:
> Friendly greetings!
> In an introductory Japanese course, there are several places where Japanese
> words are written out using "rōmaji" which basically is the
> pronunciation of the word written out using Roman characters. For example,
> The Japanese word *ローマ字* would be written as *rōmaji*.
> Would the best practice, both semantically and accessibility -wise, be to
> add the lang="ja" attribute to a wrapper <span> element? HTML code example:
> <span lang="ja">rōmaji</span>
> My thinking is that yes, it should have the lang attribute because it is a
> Japanese word. Anyone have any experience with the accessibility aspects of
> this?
> Thank you for your help!
> Murray
> Murray Inman
> Manager, Instructional Media and Accessibility
> VP, Ability Maricopa Employees with Disability Advocacy Group
> 480-517-8561 | <EMAIL REMOVED>
> RIO SALADO COLLEGE | https://riosalado.edu
> 2323 West 14th Street, Tempe, AZ 85281
> Definition of "Accessible" <http://learnatrio.com/accessibilityDefined>; by
> the Office for Civil Rights
> > > > --
Peter Weil
Web Developer
University Marketing, University of Wisconsin–Madison