-
-
Notifications
You must be signed in to change notification settings - Fork 556
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
Create badge/pill design system #531
Comments
👋 Hi, I'd love to try to tackle this! |
Hey @galantlex! Thanks so much, that would be awesome! Let me know your thoughts on what a solution might look like. Looking forward to hearing what you come up with! 🙂 |
(I can't assign this ticket to you directly @galantlex but I'll assign to myself and we can work on this together.) |
@galantlex Yeah, that looks pretty great to me! I'm thinking it would be cool to just have the icons visible beside the link text, then on link |
Makes sense! In that case do you think there should be a border around it at all, or really just the icon? Especially since some icons (react, angular) seem more self-encapsulated than others (vanilla).
|
@galantlex Good point. I think just the icons only would look pretty slick. The vanilla JS icon could be the yellow square with black "JS" text, as seen on many a laptop. 🙂 |
@galantlex Happy to chip in on this if you need help/opinions! |
Also, happy to help here. I wanted to ask if color contrast is a concern for the icons. |
@jenstrickland Excellent! For contrast, we can't do anything when using brand logos. However, if we add plain text or a custom border for the design, that's when we need to account for color contrast. @galantlex, curious if you were able to make any more headway with this? If not, no worries! I'd like to see a decision made for a design concept first before anyone takes on the coding bit. I like the concept displayed above, but thinking it could be more simplified with the logo and perhaps a tooltip on hover and focus? Or, just plain text beside the logo. Thoughts? |
@galantlex If I can help, please let me know. |
Hi yes sorry! I like the idea of just a logo + tooltip with name on hover. One thing I'm thinking there is we should make sure the area on which one can hover is large enough so that it's accessible without super fine motor control. Otherwise, should be good! |
@galantlex Good idea on the large What we'll need to actually implement this feature:
For each task please create a new branch and send PRs when you've got something ready to show. So, Team Badge/Pill Design System, @galantlex @jenstrickland @kendrick, who's interested in doing which task? |
I'm a university student about to start finals, so I'd love to hit 3 and/or 4 starting after next week, possibly after others have done 1 and 2? |
I'm grabbing the svg logos. So far, I have jquery, react, angular, nodejs. Not finding a CSS logo, nor am I aware one exists. For simplicity's sake, I think using the code you provided on CodePen is great. I can take a look at the patterns.yml/html tomorrow. |
Right, there's no "official" CSS logo per se, but folks seem to be partial to the blue shield style logo. Also thinking it would be nice to have a Sass logo, in case the author is using Sass for their styling. We can always add more as we find them. |
Work started at: https://gist.github.com/jenstrickland/dd496d1c60d1c27d01dc5c41a6e15277 Is this where I should start the work, or should I do a pull request? |
@jenstrickland I'd say create a new branch with your work and do a pull request. This way we can not only have a code review but also pull down the branch and try it out locally. 👍 |
@svinkle Cloned the repo and have everything set up. Do you want these styles to go into _layout.scss or would it be more helpful to create a _badges.scss? |
@jenstrickland I think a new |
I was just thinking since the badges are merely tooltip in this context, the markup will need to reflect this. It'll be a little different from my original pen. Hmm, I should fork my pen and make a non-link list demo. 🤔 I was also thinking how it would be neat if we had a filter feature. For example, filtering by "JavaScript" would only show vanilla JS demos. We can save this for a later time though. 😅 |
@svinkle @galantlex @ericwbailey I'm inclined to not include the svg in the code but to put the icon in CSS as a background image. I would include a link with span with aria role="tooltip" within each pattern item that includes the name text. The span would initially only show the icon, and become wider on :hover and :focus to reveal the text for the framework. Here's a sample of what I'm thinking: https://www.jenstrickland.design/experiments/ I need to add more visual design to it, if you think this is a valuable direction. What do you think? |
@jenstrickland I like the direction this is heading! Thoughts on SVG usage…A couple reasons I'd suggest using an SVG sprite instead of CSS background images:
I like your ideas on the design! Keep up the great work. 👍 General ARIA tooltip thoughts…I was also testing with a desktop and mobile screen readers. Your markup is correct in the sense that this is generally the recommended approach for tooltips, but I just can't wrap my head around this recommendation. I have this pen, Thoughts on the WAI-ARIA Tooltip spec, with what makes sense to my brain. Pretty sure @scottaohara and I have discussed this briefly in the past. I just don't understand how a link that goes nowhere on click is a good approach? |
+1 to @svinkle's thoughts on SVG spriting. The pattern @jenstrickland is proposing runs aground of some issues Heydon wrote about with Toggletips in Inclusive Components. What about wrapping the badge logo itself in It seems like a big ask to have a SR user manually toggle each tooltip to reveal what technology powers it if reading through a list. Destination-less links also rub me the wrong way, as well as concerns for hover-capable only behavior. |
@svinkle This was awesome! It's been such a long time since I've been able to collab with devs. From reading the spec, spec-in-progress, Heydon's work, plus Sara Souieden's notes, I agree hrefs that go nowhere are not ideal, and disagree with Sara on |
@jenstrickland Ah, missed that on my first pass. Apologies! |
I was worried about users on browsers without SVG support & not using a SR. As things stand now, they get neither the icon cue or the tooltip. Should we address this? Also, I just checked CanIUse and see SVG basic support is a lot better than I thought! Should we have a solution for IE <9, Android <3? @ericwbailey @svinkle @galantlex This solution is also quite a bit different from the original "pill" — is this okay, or would you like more visual design attention brought to it? I need to make the SVG sprite sheet, too. |
Hey all, So I've been reviewing the thread and the current state of the suggested pattern, and I think we're missing the mark here a bit. We really shouldn't need a As @svinkle has mentioned, he and I have spoken about the So when a user focuses an element with a tooltip, the accessible name would be announced first, and then the tooltip would be announced as the description, to mimic the behavior of the Presently, there are no special hooks to indicate that a So with that out of the way, in reviewing the present pattern, I've seen it is setup as such:
This is problematic for a couple of reasons.
Long story short, let's not confuse wanting a visual hover/focus visual "tooltip" as an a For instance:
So the above would do the following:
OK. That's all I got for now. Hope this has been helpful and the issues I outlined are clear. Thanks |
@scottaohara Totally agree. This markup structure is really great. Main issue I see is if someone wants to know what the icon represents, it would be nice to have something available on |
@svinkle @scottaohara @ericwbailey @galantlex I keep wondering why we hide the text that pairs with the icon? We have the space to display the icon and label, it will be clearer for novices, and accessible. Why are we hiding it? |
I agree with @jenstrickland; the text should be visible. See #531 (comment). |
Closing this issue for inactivity, thank you to everyone for their contributions. Please feel free to re-open the issue if you would like to continue working on this feature. |
As noted in #513 (comment) we are needing a cool / easy-to-use badge/pill design system integrated into the site.
Will try this system out on the patterns page. Needs to be flexible so that it works in other areas of the site ;)
The text was updated successfully, but these errors were encountered: