Skip to content

[CSS] explicit text truncation #579

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
pkra opened this issue Mar 21, 2025 · 3 comments
Open

[CSS] explicit text truncation #579

pkra opened this issue Mar 21, 2025 · 3 comments
Assignees
Labels
css-aam Related to CSS platform accessibility API mappings

Comments

@pkra
Copy link
Member

pkra commented Mar 21, 2025

While both text-overflow: ellipsis; and -webkit-line-clamp (etc) seem explicit enough to consider that authors want to hide the contents from all users, I think user agents do not truncate the text in the accessibility tree. Should this be documented here?

@pkra pkra added the css-aam Related to CSS platform accessibility API mappings label Mar 21, 2025
@spectranaut
Copy link
Contributor

Brief discussion in triage to spec/document the current implementations.

@rahimabdi
Copy link
Contributor

Some AT tests:

text-overflow: ellipsis

  • iOS VoiceOver 18.3.2 does not truncate
  • macOS 15.3.1 & Safari 18.3 does not truncate
  • NVDA 2024.1 & Firefox 136.0.2 does not truncate
  • JAWS 2024 & Chrome 134.0.6998 does not truncate

webkit-line-clamp (requires display: -webkit-box and -webkit-box-orient: vertical per MDN)

  • iOS VoiceOver 18.3.2 does not truncate
  • macOS 15.3.1 & Safari 18.3 does not truncate

@pkra
Copy link
Member Author

pkra commented Mar 28, 2025

Same for NVDA and JAWS with Chrome and Firefox. They can even reveal the truncated content in browse mode.

I think everything is very consistent. I just wanted to raise this for documentation since it's a case of text being in the accessibility tree while being visually hidden.

[Since I mentioned it on the call: I filed this issue while looking at tools that work very hard to remove actual content because hidden content can sometimes be noisy for non-visual users.]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-aam Related to CSS platform accessibility API mappings
Projects
None yet
Development

No branches or pull requests

4 participants