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

Language drop-down for a new toot is not marked up for Language of Parts #23699

Closed
ChasBelov opened this issue Feb 18, 2023 · 0 comments · Fixed by #23749
Closed

Language drop-down for a new toot is not marked up for Language of Parts #23699

ChasBelov opened this issue Feb 18, 2023 · 0 comments · Fixed by #23749
Labels
bug Something isn't working

Comments

@ChasBelov
Copy link

ChasBelov commented Feb 18, 2023

Steps to reproduce the problem

  1. Visit ohai.social in English
  2. Click in the What's on your mind? field.
    Type:

The following should be translated as "Did you have boba?"

有冇波霸奶茶?

The following would reasonably be colloquially translated as "No, and I'm miserable!"

冇囉!

  1. Select 有冇波霸奶茶?
  2. In the UI footer, click EN
  3. In the search box which pops up, type Chinese
  4. Right-click 中文

Expected behaviour

The tag enclosing 中文 has a lang="ZH" attribute

<div role="option" tabindex="0" data-index="zh" class="language-dropdown__dropdown__results__item" aria-selected="false">
<span class="language-dropdown__dropdown__results__item__native-name" lang="zh">中文</span>
<span class="language-dropdown__dropdown__results__item__common-name">(Chinese)</span>
</div>

The lang attribute must be at the span and not the div level, since the word "Chinese" is in English.

Actual behaviour

The tag enclosing 中文 is missing a lang attribute

<div role="option" tabindex="0" data-index="zh" class="language-dropdown__dropdown__results__item" aria-selected="false">
<span class="language-dropdown__dropdown__results__item__native-name">中文</span>
<span class="language-dropdown__dropdown__results__item__common-name">(Chinese)</span>
</div>

Detailed description

WCAG 2.1 has 3.1.2 Language of Parts (Level AA), which states that all content not in the main page's language must be marked with a language attribute. This is not happening for the language drop-down; the other-language parts are nto marked for language.

Specifications

Mastodon 4.1.0
macOS 13.2.1
Firefox 110.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant