'Web accessibility language detection with Voiceover

How does Voiceover detect language and how can I make it "speak" the same language throughout a website?

My computer is in English, I am working on a website that offers various localizations. Voiceover can very well read <p> or <span> elements in that current local (not English) but when I focus on a <button> element, it doesn't detect the language and reads everything in English, which doesn't make sense because the text is not in English. I have the lang attribute set in <html> but it doesn't seem to help. I've even added the lang attribute to the button, but still nothing.

I have tried adding a <p> element inside of a <button> but it still does the same thing.

Is that just how Voiceover works or am I doing something wrong?



Solution 1:[1]

Have you tried to add the language manually in the System Settings?

Go to System Settings > Accessibility > Voice Over > "Open Voice Over Utility" > Speech > Click "+" button on the bottom to add a new language.

screenshot of the settings window

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 sandrina-p