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

[docs] Code snippets are not accessible #1186

Closed
Studio384 opened this issue Dec 19, 2024 · 1 comment · Fixed by #1187
Closed

[docs] Code snippets are not accessible #1186

Studio384 opened this issue Dec 19, 2024 · 1 comment · Fixed by #1187
Labels
docs Improvements or additions to the documentation

Comments

@Studio384
Copy link

Docs feedback

How can we improve Base UI documentation?

There are various issues with the code examples.

  • The scrollbar doesn't appear on mouse hover, instead you must scroll before the scrollbar becomes visible. Scrolling is only possible by selecting text and dragging the cursor left and right, middle clicking the scroll wheel or - if the mouse supports it - pushing the scroll wheel left and right. There is seemingly no keyboard navigation.
  • When visible, the scroll bar is imo too easily dismissed by accidentally clicking just slightly above the bar, but being able to interact with the bar requires to be relatively fast so the scroll bar doesn't hide again.
  • On large code examples that require scrolling, this experience is just incredibly bad. Mayhaps the maximum height of the code examples should be limited.

This scrollbar seems to be based on the ScrollArea component, whose example does show the scroll bar on hovering over the area. It would be great if that behavior is used in the code blocks as well. Or better yet; just use the native scroll bars.

  • Selecting code but leaving the code block with the cursor will result in the selection being dismissed. This only happens in the collapsible code blocks.
Recording.2024-12-19.161158.mp4
  • Selecting code and going with the cursor outside the codeblock results in unexpected behavior where the selection seems to flip. This makes that some extra precision is required, because moving back into the codeblock won't restore the previous selection. This also only happens with the collapsible code blocks. This bug does not appear on Firefox.
Recording.2024-12-19.161522.mp4

Furthermore, moving even further out away from the block removes the selection entirely from the code and instead only selects the contents above it instead.

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Dec 19, 2024
@mnajdova mnajdova added the docs Improvements or additions to the documentation label Dec 19, 2024
Copy link

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

@Studio384 How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants