WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Best practice for language markup

for

From: glen walker
Date: Jul 25, 2022 7:45PM


Except that the text within your <span> is not Japanese, it's English, sort
of. Similar to how Pidgen for Chinese isn't straight English.

Phonetic alphabets aren't really a language but it looks like you might be
able to have a "fonipa" suffix on the lang attribute.

https://www.rfc-editor.org/rfc/rfc5646.html

I'm not sure if it does anything for screen readers. That *might* mean you
could have "jp-fonipa" as the language. I'm not sure but perhaps worth
investigating further.

If you had real Japanese characters in the <span>, such as the ローマ字 you
listed earlier, then that should have "jp" as the language.

Let us know if you try various combinations and can hear the screen reader
change accents.