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

Docs: Indicate links in foreign language #40767

Merged

Conversation

hannahiss
Copy link
Contributor

@hannahiss hannahiss commented Aug 23, 2024

Description

Add a lang attribute to links in another language than English

Motivation & Context

For accessibility, we have to indicate the links are in a foreign language (not only the target of the link)

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Live previews

Related issues

Copy link
Member

@julien-deramond julien-deramond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Good catch, @hannahiss

The links often include an English part in parentheses, as in 'Bootstrap 5 日本語リファレンス (Japanese)', with 'Japanese' being an English word. However, I think that your modification would likely enhance pronunciation for screen readers in the end, even though in this case, 'Japanese' would also be pronounced in Japanese.

I'm handing this PR over to @patrickhlauke for a double-check and feedback, as it's about accessibility.

@hannahiss
Copy link
Contributor Author

hannahiss commented Sep 27, 2024

The links often include an English part in parentheses, as in 'Bootstrap 5 日本語リファレンス (Japanese)', with 'Japanese' being an English word.

Yes, I thought about it, but while respecting accessibility, common words can be in another language. Fro example, in a French sentence, you can have "smartphone", "business" or "French", without indicating they are English words. I think "Japanese" will be understood by Japanese speakers.

Anyway, I am curious to have Patrick's opinion on this 😃

Copy link
Member

@patrickhlauke patrickhlauke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, why not :)

@julien-deramond julien-deramond merged commit d07536f into twbs:main Oct 2, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants