Use lang attribute to mark changes in language.
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 333
- Forks
- 127
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 11
Description
Description
On the Browse Lesson Plans & single-lesson plan pages; there's no language of parts defined for non-English lessons. E.g. https://learn.wordpress.org/lesson-plan/%ce%b5%ce%b9%cf%83%ce%b1%ce%b3%cf%89%ce%b3%ce%[…]%84%cf%8d%cf%80%ce%bf%cf%85%cf%82-%cf%80%cf%81%ce%bf%cf%83/ or the first course listed at https://learn.wordpress.org/lesson-plans/?_view=all are lessons in Greek; but they're on an English language page, so the screen reader doesn't know how to pronounce them. For Greek, this results in spelling each word out (Epsilon iota sigma, etc.); in a language using the roman alphabet it would just be really bad pronunciation. It would be good if non-English language strings were wrapped in appropriate language attributes.
Step-by-step reproduction instructions
Visit any page with mixed languages.
Activate a screen reader. (E.g., NVDA, VoiceOver)
Attempt to read the content.
Expected behaviour
Strings should be pronounced according to the language they are written in.
Actual behaviour
Strings are pronounced using the phonemes of the page's global lang attribute.
Environment information
This is expected behavior when the language is not marked correctly using a lang attribute. However, for reproduction it's important to note that not all voice synthesizers handle language changes on the fly, so even when correctly marked up, the results may vary depending on which screen reader is used and which voice synthesizer is configured in that screen reader.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the templates or components rendering the Browse Lesson Plans and single-lesson plan pages, then reproduce the issue with a screen reader on a mixed-language page. Done means non-English lesson strings have appropriate lang attributes and are pronounced using their written language where supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- accessibility, frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100