-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Focus outline on Code Snippet is unstyled #2304
Comments
cc @dakahn do you agree on the textbox stuff? |
Yeah, exactly right. Wrong role. I can bundle these fixes in with some code snippet improvements that have been made recently to CCR. 👍🏽 |
We've marked this issue as stale because there hasn't been any activity for a couple of weeks. If there's no further activity on this issue in the next three days then we'll close it. Thanks for your contributions. |
Looks like this was taken care of 😄 |
I was just about to open an issue about the focus style on code snippet and found this issue. In the single-line codesnippet the focus style beyond the box, in the multi-line it's just unstyled: Using Chrome v79 on macOs 10.14.6 |
Confirmed this is still present. @carbon-design-system/design , what should we do with this outline here? |
ok yeah then lets just do that, have the focus on the copy icon and then the show more only^ . |
Focus styles have been removed from multi-line snippet, @emyarod is going to look into a possible cross-browser / os solution to the single line snippet in a separate PR |
just a proof of concept, still WIP but looking for feedback before I continue @laurenmrice @tw15egan here's a screenshot dump but we can go over this in more detail later on. every category below has 3 images each showing Windows 10, macOS with hidden scrollbars, and macOS with visible scrollbars. the first set is the as-is, the second set is a CSS only fix, and the third set includes a proof of concept that includes JS. as-isdefaultsnippet focusedcopy button focusedpreliminary fix (no height adjustments)defaultsnippet focusedcopy button focuseddynamically set height based on whether or not scrollbar is presentif the content is short and a scrollbar is not rendered, it will appear the same as the prelim fix screenshots above on macOS defaultsnippet focusedcopy button focused |
@emyarod thanks for taking the time to put these screencaps together 🙏 Makes it very easy to illustrate the issue. |
if the "preliminary fix (no height adjustments)" solution is fine then I can continue with that, but the proof of concept with a bit of tweaking might be worth implementing |
Personally, I think the preliminary fix (no height adjustments) looks great and could be implemented immediately it seems. I like that it stays the same height in both macOS versions. |
agreed, lets go for that ^ |
When clicking in a code snippet, it appears that we have a un-styled focus indicator:
This is called (I believe) by
tabindex="0"
androle="textbox"
, which I believe is moreso meant for an area where you can freely edit text.The text was updated successfully, but these errors were encountered: