-
Notifications
You must be signed in to change notification settings - Fork 57
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
Link component needs a11y compatibility updates #334
Comments
Also, I believe |
Even the text "no-padding" version has top and bottom padding. I guess it's named awkwardly, it's "no-horizontal padding". We could remove all padding and make it truly a text only no styling thing. |
@rymorgan @cassytaylor I think we need some design input here to know what your intent is. Then there's also a technical component, though, in that everything could be a text button if we didn't need SEO crawlability, but we do. But it's not always clear when we need that because any component could be dropped onto a secured page or a public page needing SEO. And in order to do links properly in NextJS, we replace the default |
@kieckhafer @aldeed I'm not 100% sure if I understand the problem, but if it's a matter of styling, would it be possible to just underline the link text to convey that it's a link? Unrelated, but it seems like that (underlined text as a link style) should be added to our CL anyway, since text buttons with just top & bottom padding look kinda wonky |
@cassytaylor Yes, I guess there are a couple questions here. We should be careful about the terms "link" and "button". That should be a technical decision based on whether we need links that crawlers can follow, but you may choose to design based on that information. In other words, something that looks like underlined text in the design might be best implemented as a button element, while something that looks like a button might be best implemented as a link element. So I think what we need is a single "simple text with underline" text type, and we'll make both the Button component and the Link component capable of rendering that way. (Maybe the text-only, no-padding button can just be adjusted to look like this, removing the top/bottom padding and hover background.) |
Type: minor
Describe the bug
The
Link
component has two possible outputs: ana
tag, which is used whenhref
is present, and adiv
tag, which is used whenhref
is not present.The
div
version of the component needs to be updated fora11y
compatibility. This can be done in one of two ways:Button
component, and swapping the div for a buttonOption 2 is probably the best long term solution. but this should be discussed before proceeding with any work this ticket.
If option 1 is selected, we should document all KeyBoard events that need to be added in order to reach
a11y
compliancy, and create a checklist for future use.The text was updated successfully, but these errors were encountered: