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

[Bug]: Addon-a11y displays visual bug when running the tests #24450

Open
yannbf opened this issue Oct 12, 2023 · 7 comments · Fixed by #29552
Open

[Bug]: Addon-a11y displays visual bug when running the tests #24450

yannbf opened this issue Oct 12, 2023 · 7 comments · Fixed by #29552

Comments

@yannbf
Copy link
Member

yannbf commented Oct 12, 2023

Describe the bug

The "Highlight results" checkbox gets misplaced as you run the a11y tests:

2023-10-12 09 41 24

To Reproduce

  1. Access any Storybook with addon-a11y, for instance this one: https://mealdrop.vercel.app/storybook/?path=/story/components-iconbutton--default
  2. Open Accessibility panel
  3. Open the "Passes" tab, where "Highlight results" is shown
  4. Click on "Tests completed" at the bottom right
  5. Experience the bug!

System

No response

Additional context

No response

@Nevnet99
Copy link
Contributor

Will also take this one :) if it's going :)

@tajbaba999
Copy link

Hey @yannbf can you please tell me the steps to produce this bug? can you please assign me this issue?

@yoshi2no
Copy link
Contributor

yoshi2no commented Oct 14, 2023

Hi! @yannbf

I'm working on this issue, but I have a question regarding the solution. It seems that with this change in #6563, the Highlight results section is moved when the width of the Container is small(450px). However, when clicking on Tests completed, the value of width from useResizeDetector becomes undefined, causing it to be perceived as having a small width even on a PC display.

file: code/addons/a11y/src/components/Tabs.tsx

To resolve this issue, We could hide the Highlight results element until the width of the Container is obtained. However, it disappears every time Tests completed is clicked.

width-undefined.mp4

Alternatively, we could stop moving the Highlight results based on the Container's width and fix its position. Then, if it's less than 450px, it can be viewed through scrolling. Which approach seems better? Thanks!

スクリーンショット 2023-10-14 16 31 11

@yannbf
Copy link
Member Author

yannbf commented Dec 1, 2023

Hey @yoshi2no thanks for working on it! I'll leave it up for @cdedreuille to give his opinion design-wise.

@cdedreuille
Copy link
Contributor

I think your second option seems the most appropriate since we need horizontal scrolling anyway. The only thing I would add based on what your shared is that we need to add padding on the right to make sure the checkbox is not touching the sides.

@JohannesFischer
Copy link
Contributor

I don't even think this needs the resize observer and this can be fixed in a CSS only solution. Happy to work on this if someone assigns this to me.

@yannbf
Copy link
Member Author

yannbf commented Nov 4, 2024

@JohannesFischer feel free to propose a PR, we'd love to see it :)

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

Successfully merging a pull request may close this issue.

6 participants