-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Add support for using multiple languages in a single post #23698
Comments
Not sure if there's a detail I've missed but this appears to be a duplicate of #22766 |
Duplicate of #22766. Agreed, this and that cover the same topic. Will close this one as duplicate and cross-post there. |
i'd actually disagree -- this issue and that issue seem to be different. this one asks for tagging a post as containing multiple languages; #22766 asks for making a post with different versions for different languages. |
with that said: #18538 (comment)
so #18538 seems like the closest duplicate of this. |
That's only one suggestion within the entire comment thread of #18538 , though, and what's requested in this issue isn't mentioned in the description for #18538 at all. This request for the ability to tag a post with multiple languages could get lost completely if this is closed in favour of an issue where the requirement is mentioned only in passing in a thread of over 30 comments so far. Adding multiple languages to one post isn't the same as adding a "multiple language" tag, either. If I want to filter for a language I want to be able to find posts that contain some of that language. How would I filter for posts that contain both Japanese and English, for example, if any post containing multiple languages was just tagged "multiple languages"? There'd be no way. The Japanese and English post has to be tagged in a one-to-many relationship with all languages used, so people who want to see posts containing either language will see it. |
It seems more like a duplicate of #18241 if anything... no? |
possibly! i think after closing duplicates i will try to gather up "related issues" into larger "tracking issues", and this one would definitely fall under #18241 |
Noting that a multiple-language tag would violate WCAG 2.0 AA language of parts. WCAG requires that each language's content be individually marked as specifically being in that language. |
Steps to reproduce the problem
The following should be translated as "Did you have boba?"
有冇波霸奶茶?
The following would reasonably be colloquially translated as "No, and I'm miserable!"
冇囉!
Expected behaviour
Current language in the UI displays as EN, and I can proceed to set 冇囉! to ZH as well. When I subsequently post, most of the post will not be wrapped in a tag having the lang="ZH" attribute, only "有冇波霸奶茶?" and "冇囉!" will.
Actual behaviour
Current language in the UI displays as ZH. If I post now, the entire toot will be wrapped in a tag having the lang="ZH" attribute.
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 possible to satisfy for a mixed-language toot. There is a language marker facility, but it can only be applied to the entire toot.
The correct accessible Mastodon behavior would be to support such markup within a toot.
Discussion:
Technically, this is also an issue for mixed-language alternative text attributes, title attributes, and aria-label attributes. However, since HTML does not support language markup within HTML tag attributes, there is nothing Mastodon can do as of Feb. 18, 2023, to remedy this until such time HTML is updated to support Language of Parts within attributes.
Note that the Chinese text is colloquial Cantonese and would best be marked as YUE or ZH-YUE rather than ZH, but that's a feature request and separate from this current issue.
Specifications
Mastodon 4.1.0
macOS 13.2.1
Firefox 110.0
The text was updated successfully, but these errors were encountered: