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

Truncating text on a button component #2407

Open
colabottles opened this issue Oct 17, 2024 · 0 comments
Open

Truncating text on a button component #2407

colabottles opened this issue Oct 17, 2024 · 0 comments
Labels
enhancement New feature or request triage

Comments

@colabottles
Copy link

colabottles commented Oct 17, 2024

For what version of Nuxt UI are you suggesting this?

v2.x

Description

About using truncated text on interactive elements, in this case, buttons. e.g., https://ui.nuxt.com/components/button#truncate. Accessibility-wise, it is a concern.

Truncating text with ellipsis is not an acceptable solution because the text that is truncated is still not readable by a screen reader. Instead, wrapping the text to the next line fixes the original layout issue while ensuring that the text is readable.

I would recommend to fix this and suggest hyphenating words that are long or button text that overflows the button.

This could cause issues not only with screen readers but also has the potential to cause Reflow and break Text Resize and also for users that need wider text spacing as well, this could fail Text Spacing.

Additional context

Refer to: https://yatil.net/blog/text-overflow-ellipsis-harmful

@colabottles colabottles added enhancement New feature or request triage labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage
Projects
None yet
Development

No branches or pull requests

1 participant