-
Notifications
You must be signed in to change notification settings - Fork 331
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
Only add underline to back link when href exists #1620
Conversation
"Browser default behaviour is to underline anchors only when an href is provided. This is to ensure users can identify links on a page (an anchor without an href is not considered a link by default). This feature also has the side effect of helping developers realise that they may have missed an href attribute - as they can visually see on the page that a link is not underlined." Fixes #1171
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. The underline is also added if href
is empty. Do we care about that? If yes, I wonder if we could omit the style if .govuk-back-link[href=""]
.
Looking at the spec, '[if] the |
@hannalaakso how do you feel about following the spec? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense 👍
Fixes: #449 Revist: #1171 To match: alphagov/govuk-frontend#1620 React Router would provide an href. If no href is provided, the absense of an underline would be a prompt for the developer to add one. This mirrors user agent stylesheets for an anchor.
Fixes: #449 Revist: #1171 To match: alphagov/govuk-frontend#1620 React Router would provide an href. If no href is provided, the absense of an underline would be a prompt for the developer to add one. This mirrors user agent stylesheets for an anchor.
"Browser default behaviour is to underline anchors only when an href is provided. This is to ensure users can identify links on a page (an anchor without an href is not considered a link by default).
This feature also has the side effect of helping developers realise that
they may have missed an href attribute - as they can visually see on the
page that a link is not underlined."
Fixes #1171