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

[code-snippet]: min-width causes reflow (400%) violation #7406

Closed
swgraham opened this issue Dec 4, 2020 · 2 comments · Fixed by #7420
Closed

[code-snippet]: min-width causes reflow (400%) violation #7406

swgraham opened this issue Dec 4, 2020 · 2 comments · Fixed by #7420
Assignees
Labels
component: code-snippet good first issue 👋 Used by GitHub to elevate contribution opportunities type: a11y ♿

Comments

@swgraham
Copy link

swgraham commented Dec 4, 2020

Environment

Operating system
MacOS

Browser
Chrome
(any?)

Assistive technology used to verify
Set resolution to 1280 x 800 Zoom to 400%
OR
In Chrome use Responsive mode, set to 320x260

Detailed description

What version of the Carbon Design System are you using?

7.24/10.24

What did you expect to happen?

When resize screen to 320px wide - Should be able to see single line code snippet Copy Button w/ padding of 1rem on each side.

What happened instead?

Single line code snippet itself min-width is 320px so with any padding around it, you cannot see or USE the copy button.

What WCAG 2.1 checkpoint does the issue violate?

1.4.10 REFLOW

https://codesandbox.io/s/exciting-wave-q0cy5?fontsize=14&hidenavigation=1&theme=dark

In above codesandbox, make width of embedded browser <340 and you will see copy button become inaccessible.

@emyarod
Copy link
Member

emyarod commented Dec 8, 2020

I don't think the codesandbox you provided shows the right issue, but the workaround would be to reduce the min-width value on .bx--snippet--single

@swgraham
Copy link
Author

swgraham commented Dec 8, 2020

You are correct on codesandbox, I had edited it mistakenly on another issue and have reverted it to be correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: code-snippet good first issue 👋 Used by GitHub to elevate contribution opportunities type: a11y ♿
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants