Skip to content

3.1.2 Language of Parts - Computed acc name clarification + ambiguous example #4423

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

giacomo-petri
Copy link
Contributor

Closes: #4420

Description:
This PR aims to clarify the last scenario in the understanding doc
Español editing a little bit the example.

Additionally, it introduces a few more examples to address previously uncovered scenarios. It highlights the recommendation that when an element with an accessible name calculated from its content is in a different language, the lang attribute should be applied directly to that element. It also acknowledges that if the computed name includes multiple languages, it's acceptable to use the primary language of the sentence for that portion.

Copy link

netlify bot commented Jun 3, 2025

Deploy Preview for wcag2 ready!

Name Link
🔨 Latest commit b37038a
🔍 Latest deploy log https://app.netlify.com/projects/wcag2/deploys/683ed6c9bfa93d00084c3bc7
😎 Deploy Preview https://deploy-preview-4423--wcag2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@@ -141,14 +141,27 @@

Alternative language links

...
<li><a href="..." lang="zh-hant">繁體中文</a></li>
</ul>

Element's content used as accessible name

Copy link
Member

Choose a reason for hiding this comment

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

I'd preface this section with a preamble about the limitation of current assistive technologies in handling changes of language as part of their accessible name calculation. Explaining that while theoretically correct, switching language inside the accname is not currently supported. This then leads into the first example as simple mitigation.

Would be interested to know if this issue just happens in forms mode or also in browse mode? Does it also affect accessible description? Any other scenarios?

in the second example, you're technically not "setting" the parent element to the primary language ... you're letting it inherit the language from the document's overall language. and it's perhaps not that this is "acceptable", but rather that it's still required to do so (but being aware that AT may not switch language when announcing the link).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3.1.2 Language of Parts - Computed acc name clarification + ambiguous example
2 participants