Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About "diverging in language or direction can also cause other accessibility problems", what does this refer to? Are there any examples?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E.g. WCAG 2.5.3 seems likely to fail. Adjusting one of the examples in F96:
<button id="sitesearch" aria-label="Find in this site">Finde in dieser Seite</button>.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I think it might be useful to link to (or add) a concrete example in the note.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From looking back at the issue, we could consider discussing this in the context of an example like:
Of note: French and English TTS engines won't have a problem pronouncing either language in that label, so a western+nonwestern language example might be better to use, if you can think of a non-contrived one.
Some other solutions that may be reasonable.
nameFrom: contentsso that you can appropriately apply thelanganddirattributes to substrings where useful.I'm including that sentence again here without the lang markup in case people want to test in various contexts:
In the second sentence, the same kanji (京 for capital) is used in both Tokyo (東京) and Beijing (北京).
In my current testing of the second sentence using VoiceOver on macOS, all three languages are pronounced correctly (w/ or w/o the
langmarkup), using three different speech engines, which is why I think the NLP note could work. It should also note however, that sometimes NLP has an ambious result, so the web author should avoid relying on langauge changes in translatable attributes if pronunciation is critical.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then again, on-device models might trim that ambiguity rate down to effectively nothing in the near future, so maybe the caveat isn't necessary.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does HTML or another spec have a similar note? The HTML
titleattribute, for example, would have this same issue. Instead of writing a new note here, point an ARIA reference to the note in HTML. If it doesn't exist in HTML, this issue could be duped to one on that spec.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re language detection, see https://www.w3.org/TR/string-meta/#language-detection
re HTML, I couldn't find any specific notes in HTML—only some old bug reports (like 23305 and 8931). I recall there were more in-depth discussions, though I can't seem to locate them right now.
However, this guideline has been part of the i18n specdev for years; perhaps you could refer to it: https://www.w3.org/TR/international-specs/#markup_elements_attributes