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

Only add underline to back link when href exists #1620

Merged
merged 2 commits into from
Oct 29, 2019

Conversation

NickColley
Copy link
Contributor

"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

"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
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1620 October 25, 2019 10:30 Inactive
Copy link
Member

@hannalaakso hannalaakso left a 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=""].

@36degrees
Copy link
Member

The underline is also added if href is empty. Do we care about that?

Looking at the spec, '[if] the a element has an href attribute, then it represents a hyperlink (a hypertext anchor)' – whether the href attribute is empty or not doesn't appear to be a consideration. I'd suggest we follow the spec here.

@NickColley
Copy link
Contributor Author

@hannalaakso how do you feel about following the spec?

Copy link
Member

@hannalaakso hannalaakso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense 👍

@NickColley NickColley merged commit bd21ff1 into master Oct 29, 2019
Design System Sprint Board automation moved this from Needs review to Done Oct 29, 2019
@NickColley NickColley deleted the only-add-underlines-to-back-link-if-href branch October 29, 2019 10:54
@NickColley NickColley added this to the Next milestone Oct 29, 2019
@hannalaakso hannalaakso moved this from Done to Ready to release in Design System Sprint Board Nov 4, 2019
@36degrees 36degrees removed this from the Next milestone Nov 7, 2019
@NickColley NickColley added this to the v3.4.0 milestone Nov 13, 2019
@36degrees 36degrees mentioned this pull request Nov 19, 2019
@36degrees 36degrees moved this from Ready to release to Done in Design System Sprint Board Nov 19, 2019
penx added a commit to govuk-react/govuk-react that referenced this pull request May 22, 2021
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.
penx added a commit to govuk-react/govuk-react that referenced this pull request May 24, 2021
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

back-link is underlined when no href is provided
5 participants