May the web page name be in the same language as the page itself

It’s a minor thing, but seems weird when the page content is written one way, while taxons in page name in the browser stays in English. Can it be changed?

This is also an accessibility fault, because accessibilty techs, like screen readers, will use the Page Language to read aloud the content.

@fffffffff, everything in your screenshot looks like it’s in Russian to me… except the word “Subgenus” in the page title which looks like a translation bug on our end. Is there something else that isn’t translated, or just that?

@ecureuill, unfortunately iNat has many, many problems with accessibility, but I don’t think this is one of them. When I go to https://www.inaturalist.org/observations/30549161?locale=ru and view the source, I see

<html xmlns="http://www.w3.org/1999/xhtml"
      xml:lang="ru"
      lang="ru"
...
> 

and

<meta http-equiv="Content-Language" content="ru">

If what you’re saying is correct, a screen reader should read the page in Russian, which is the desired language, correct?

1 Like

Just that, if there’s a taxon grade it always is shown in English for some reason.

2 Likes

Got it. Definitely a bug. I have a fix checked in, but I’m trying to resolve some problems with Crowdin at the moment, so hopefully we’ll be able to get this fix onto the site when that’s done.

4 Likes

If the Page Language is in Russian but part of the content is in English, this will be a problem for users who depends on assistive techs. Screen readers will try to read aloud an english term using russian or a braille display will fail to translate from russian.

In case of the taxon term do not have a Russian version, the solution should be add a lang metadata for the term

 <span lang="en">Lasius</span>  

https://www.w3.org/WAI/WCAG21/Understanding/language-of-parts.html

I have no idea about programming, but Lasius should stay in Latin if someone doesn’t want to add a name which is an exact copy, but with different letters, in the first example the problem is in “subgenus” word which is translated on the page itself as you can see, same with “family” or any other rank.

1 Like

I don’t know if this helps, but I have noticed that this only happen for low ranks, for high ranks such as phylum or order it does not happen.

See that phylum is translated to filo

But tribe is not translated to tribu

1 Like

You’re right, that’s weird. image

Ah, ok, I understand. So in the <title> element of the page that’s not actually going to be valid (can’t have additional tags in that element), but we could / should do that for text in the <body> . I suspect we can support those lang attributes in situations where the text has not been translated into the current locale and the software is falling back to another (e.g. showing English when text hasn’t been translated into Russian, or Spanish when text hasn’t been translated into Mexican Spanish), but I don’t think it’s out-of-the-box functionality of the localization software we’re using. Will have to investigate.

1 Like

Agree!

And fixing my example to the correct ISO lang code of Latin:

<span lang="la">Lasius</span>

Scientific names are actually a very weird case and I’m not sure what the best treatment would be for screen readers. They’re not technically in Latin or in any spoken language (current or archaic), and I’m not sure telling a screen reader that they are in Latin would help the screen reader with pronunciation. I guess it would at least provide a signal that the text is not in the target language, e.g. “don’t try to pronounce this in Russian.”

3 Likes

This is looking OK for me now, e.g. the page title at https://www.inaturalist.org/observations/61547006 says “Подрод Lasius из Profug, Alushta за Август 02, 2020 в 00:47 от Marina […]”

and at https://www.inaturalist.org/observations/62963021 it says “Семейство Noctuidae (Совки) из Королёв, Московская обл., Россия за Октябрь 15, 2020 в 21:30 от Marina […]”

1 Like

Yes, great!

1 Like