WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Lang attribute on names

for

From: Patrick H. Lauke
Date: Jul 27, 2022 2:38AM


On 27/07/2022 08:28, Barry via WebAIM-Forum wrote:
> The recent thread on the use of the lang attribute has prompted a question.
> Should the lang attribute be used on foreign language propper nouns, such as
> a persons name or the name of foreign cities? Im specifically thinking about
> an international sports page with lots of foreign names of players. It
> would be a hell of a task to put the lang attribute on each one, but should
> it be done to conform to a11y?

Purely for compliance aspect, note the exceptions listed in the SC
itself (which include "proper names":

"The human language of each passage or phrase in the content can be
programmatically determined except for *proper names*, technical terms,
words of indeterminate language, and words or phrases that have become
part of the vernacular of the immediately surrounding text."

https://www.w3.org/TR/WCAG21/#language-of-parts

Though I'd add that there may still be situations where providing a lang
attribute is useful to give proper hints to assistive technologies to
switch to different speech/language (e.g. if you have the main content
in English, but then have a person's name written in simplified Chinese
or Japanese or other non-roman alphabets).

P
--
Patrick H. Lauke

https://www.splintered.co.uk/ | https://github.com/patrickhlauke
https://flickr.com/photos/redux/ | https://www.deviantart.com/redux
twitter: @patrick_h_lauke | skype: patrick_h_lauke