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

Inline ActionList.Description can result in horizontal overflow #4664

Closed
khiga8 opened this issue Jun 11, 2024 · 2 comments · Fixed by #5169
Closed

Inline ActionList.Description can result in horizontal overflow #4664

khiga8 opened this issue Jun 11, 2024 · 2 comments · Fixed by #5169
Assignees
Labels

Comments

@khiga8
Copy link
Contributor

khiga8 commented Jun 11, 2024

Description

When <ActionList.Description variant="inline"> contains very long content and we're on a small viewport, the content overflows and causes a horizontal scrollbar to appear. This is an accessibility WCAG Reflow issue.

Notably, <ActionList.Description variant="inline"> currently wraps the content with Truncate which also poses accessibility concerns since keyboard users aren't able to access the truncated content.

One option that comes to mind is to not truncate at all, and have the content wrap. This would resolve the horizontal overflow concern and the truncate concern. This also aligns with what the Primer Rails ActionList currently does:

Screenshot of very long inline description in Primer Rails ActionList, which wraps around

However, this would be a visual change to Primer React ActionList, and may benefit from designer input. As of right now, there are around ~40 instances of ActionList.Description variant="inline" according to primer query (source 1 + source 2)

Steps to reproduce

See storybook example from #4665!

I also tried Code Sandbox but I could not get the latest version of primer/react to run.

Version

v36.21.0

Browser

Chrome

@joshblack
Copy link
Member

Hey there! Going through this in backlog cleaning today for PRC. Wanted to include design here to double-check on the change for horizontal overflow to not wrapping 👀

@broccolinisoup
Copy link
Member

Hello! @mperrotti suggested that we can wrap the content as we do in PVC. Since this is a rare case, we are okay with that.

@khiga8 Feel free to push a PR if you already have, otherwise we will move this in our backlog.

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

Successfully merging a pull request may close this issue.

4 participants