Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support lang HTML attribute for multilingual text #7963

Closed
quincylvania opened this issue Sep 9, 2020 · 0 comments · Fixed by #7998
Closed

Support lang HTML attribute for multilingual text #7963

quincylvania opened this issue Sep 9, 2020 · 0 comments · Fixed by #7998
Assignees
Labels
accessibility Relates to personal ability or assistive tools localization Adapting iD across languages, regions, and cultures
Milestone

Comments

@quincylvania
Copy link
Collaborator

quincylvania commented Sep 9, 2020

The lang attribute is used on HTML elements to specify the language, script, and locale of the contained text. Encoding this info explicitly helps web users in a number of ways, including:

  • Pronunciation in text-to-speech (critical for users of screen readers especially)
  • Formatting, such as how to break words when wrapping text between lines
  • Auto-transliteration, where a browser or extension translates foreign text into the user's language

Since iD isn't 100% translated into all languages, many mappers experience a mix of English and non-English strings. Adding lang attributes will improve this experience.

Re: #7713

@quincylvania quincylvania added localization Adapting iD across languages, regions, and cultures usability An issue with ease-of-use or design accessibility Relates to personal ability or assistive tools and removed usability An issue with ease-of-use or design labels Sep 9, 2020
@quincylvania quincylvania self-assigned this Sep 16, 2020
@quincylvania quincylvania added this to the 2.19.0 milestone Sep 16, 2020
quincylvania added a commit that referenced this issue Sep 16, 2020
…ess `html: false` is specified in the options (re: #7963)

Update `text` functions to `html` to support inserting the `span` elements
Specify `html: false` for various instances where a `span` is not desired, e.g. `placeholder` and `title` attributes
quincylvania added a commit that referenced this issue Sep 22, 2020
Add lang attribute to more text (re: #7963)
quincylvania added a commit that referenced this issue Sep 23, 2020
Include all preferred and fallback langauges in coreLocalizer.localeCodes even if higher-priority ones have 100% string coverage
Fallback to the user's preferred languages instead of directly to English when querying OSM wikibase documentation and Wikidata (re: #7996)
Add `lang` attribute to tag documentation text loaded from OSM wikibase or Wikidata (re: #7963)
quincylvania added a commit that referenced this issue Sep 28, 2020
Add `lang` attribute to brand name dropdown labels (re: #7963)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Relates to personal ability or assistive tools localization Adapting iD across languages, regions, and cultures
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant