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

fix: links in article content #3171

Merged
merged 3 commits into from
Mar 11, 2021
Merged

fix: links in article content #3171

merged 3 commits into from
Mar 11, 2021

Conversation

schalkneethling
Copy link

Fixes underlines and colors of links in main page content.

Fix #2901

Fixes underlines and colors of links in main page content.

Fix #2901
Copy link
Contributor

@peterbe peterbe left a comment

Choose a reason for hiding this comment

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

Perhaps there's a good reason for it but I find it so odd that the sidebars, breadcrumbs, document-footer are not underlined, but all the links within the document itself are.
I think it makes sense for the links in the top navbar to not conform because they're almost expected to be different.

And why aren't the links on the home page underlined? Or the writer's home page? Or the 404 page?

I don't mind the inconsistencies if I understood why it is like that.

Mind you, I don't know much about CSS resets but why can't it just be that all links are underlined, except the exceptions like the navbar, auto-complete search results, buttons, and maybe the page footer (because they're of an entirely different color).

Also, I admit that I don't understand a11y very well so perhaps there's a story there. But right now it feels a bit "hotch-potch mixed bag".

@schalkneethling
Copy link
Author

Perhaps there's a good reason for it but I find it so odd that the sidebars, breadcrumbs, document-footer are not underlined, but all the links within the document itself are.

So, here is my thinking. It is a delicate balance one has to achieve here. In some contexts such as in the sidebar, the header, and the footer I believe people pretty much assume the items in there to be links in general.

The reason the underline is important in the main article body is that while the color contrast between the link text and the background is good, the contrast between the plain text and the link text is not as clear. Adding explicit underlining to these then makes them clearly stand out.

If we add link underlines to everything wholesale, you will quickly get into a situation where we cause a different problem in terms of cognitive overload. There is just too much asking for your attention. Our main content already suffers from this in that the articles feel a bit like a wall of text.

This is something that we will address next.

@schalkneethling schalkneethling requested a review from peterbe March 10, 2021 12:20
@peterbe
Copy link
Contributor

peterbe commented Mar 10, 2021

Perhaps there's a good reason for it but I find it so odd that the sidebars, breadcrumbs, document-footer are not underlined, but all the links within the document itself are.

So, here is my thinking. It is a delicate balance one has to achieve here. In some contexts such as in the sidebar, the header, and the footer I believe people pretty much assume the items in there to be links in general.

The reason the underline is important in the main article body is that while the color contrast between the link text and the background is good, the contrast between the plain text and the link text is not as clear. Adding explicit underlining to these then makes them clearly stand out.

If we add link underlines to everything wholesale, you will quickly get into a situation where we cause a different problem in terms of cognitive overload. There is just too much asking for your attention. Our main content already suffers from this in that the articles feel a bit like a wall of text.

This is something that we will address next.

Ok. That's a great argument for not using underlines in the sidebar, because, apart from headings, everything is a link. Same is true for most things in the footer and the top navbar. But what about the home page, the document footer, apps. They're also blue texts on white background next to lots of non-link black texts on white background.

I'm wondering, would it be a better idea to make underlining the default and then sidebars and top navbar become the exception.

@schalkneethling
Copy link
Author

But what about the home page

I do not think there is anything on the homepage that would really benefit from being underlined. The links that are there are clearly distinguishable

I'm wondering, would it be a better idea to make underlining the default and then sidebars and top navbar become the exception.

I reckon we will be overriding a lot more than it might immediately seem. I am happy to be wrong, but I reckon we are in a good place with this PR.

document footer

I assume you are referring to "Found a problem with this page?"? I also thought about it and I reckon it is a good idea to underline those links as well. Let me update the PR with that.

@schalkneethling
Copy link
Author

@peterbe updated to also underline links in the document footer. Thank you for the suggestion.

@peterbe peterbe merged commit 7ad6c7e into mdn:main Mar 11, 2021
peterbe pushed a commit to peterbe/yari that referenced this pull request Jun 1, 2021
* fix: links in article content

Fixes underlines and colors of links in main page content.

Fix mdn#2901

* update print style rules

* underline links in meta document footer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with all content: Missing link underlines
2 participants