-
Notifications
You must be signed in to change notification settings - Fork 510
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
Issue with all content: Missing link underlines #2901
Comments
@aardrian , you are a saint ;-) I have tried to get link underlines added to MDN a couple of times, and it seems good to revisit this. The person to talk to about this would be @schalkneethling , our front-end dev. What do you think man? What is the usual procedure for making such sweeping changes, and where would be best to file this issue? |
I'd say, this issue should be transferred from mdn/content to mdn/mdn-minimalist, since it's a styling issue. |
Hello @chrisdavidmills and @aardrian, since this is an easy fix, I would like to work on this. This would be my first bug fix. Can I start working on the same? |
@dhananjayd1729 I have no say in whether you can jump on this. However, as I note in the issue:
So there is a risk your PR will be rejected if it enables underlines in navigation, footer, etc. |
A quick reminder that underlines can also be styled now, e.g., a {
text-underline-offset: .13em;
text-decoration-thickness: .01em;
} |
@aardrian I will try to underline only those links which are actually in the body of the HTML page(i.e apart from the footer and navigation). Will that work? |
To avoid duplicated efforts on this, I assigned this issue to @dhananjayd1729 in the meantime. |
Thank you, @Ryuno-Ki |
Thank you @aardrian for reporting this. It is a BIG oversight. Whoever picks this up, here is what you are going to need to change: yari/client/src/document/index.scss Line 46 in 200521c
|
Please don't assign issues. Not even to people in the core team. We assign them to ourselves or perhaps in some exceptions, for each other after we've had offline conversations. Contributors are more than welcome to make pull requests but they have to take the chance that a PR might come in slightly later than another contributors PR. All too often we've seen it happen over the years that well-meaning contributors show interest in solving an issue (and sometimes get assigned) but the PR never comes. To us, assignment is similar to putting something on our "weekly" to-do list. It's not ownership or best-matched domain/area. |
In my opinion, it could be an anarchist attempt in which everyone can self-assign issues and even steal them from others and see if the team manages itself as the Agile theorists theorize.
This Is a Issue. Aside from that, you should investigate where the links have been unsubscribed and not add places where they are underlined (although it may seem like a maintenance gesture). And it would be nice to give a touch of style 🖌️ to the underlining perhaps with mathematically reasoned values. Even di could change from |
Did you clone the content repo at the URL below to that location @dhananjayd1729? |
Yes, I did. I cloned 'content' and 'yari' repo in the 'mozilladocs' folder. |
Ah! Just noticed. You need to add |
Also, is the |
All good now @dhananjayd1729? |
I will try in a bit and will comment here. |
@dhananjayd1729 That is interesting. I am not entirely sure on that one, I reckon either @fiji-flo or @peterbe will be able to assist here. On a side note, are you planning on working on this issue? In other words, is that why you are getting all of this set-up? Or is it unrelated? |
Thanks, @schalkneethling. Yes, I'm planning to work on this issue and would like to work on more issues in the future. |
@dhananjayd1729 what's your Can you run |
@fiji-flo CONTENT_ROOT=/files . I didn't run 'yarn tool gather-git-history' yet. |
On Windows, |
|
@dhananjayd1729 Can you run that again but with this:
It won't solve the immediate problem but next time, it'll print out a log stacktrace that shows exactly in which file that happened. |
No, I'm stuck even after 'content root' points to files folder in a clone of 'content' . |
Another important fix landed today relating to Windows and that |
'Latest main' as in? |
We used to have the default branch be called |
So you are basically suggesting me to change the directory to content? Because yari is the master branch at this stage. |
I know it's confusing with all the branches and stuff. It takes some getting used to. |
@dhananjayd1729 In #2951 @peterbe explained how to update a local setup to use |
I tried that but it only underlines the I'm too old-school to understand why minimalist even removes this. I think it should be reset/default and then we can make exceptions on top. Like: |
Since the content links are the ones that need the underlines, not affecting footer, sidebars, and breadcrumbs seems fine. I agree that the headings likely do not need underlines (though I do like the pattern of an icon to indicate they can be used as anchor links for sharing, making them distinct from content links that navigate someone). |
That is fine and the intent of the change here.
I did consider it but, I think we will have to undo more underlining than we currently will have to add exceptions where we do want underlines. |
@dhananjayd1729 were you able to get up and running? |
@schalkneethling I was having exams back then so I couldn't look into it. But yeah from today onwards I will try to run again. |
Ok, let me know if you run into problems or have any questions. |
@dhananjayd1729 This is on the critical path for us so I am going to pick this one up. Please have a look at issues marked as good first issues or just let us know if you are interested in picking something else up. I hope you have gotten Yari working locally. Thank you again for your interest in contributing. |
* fix: links in article content Fixes underlines and colors of links in main page content. Fix #2901 * update print style rules * underline links in meta document footer
Glad to see this wrapped up, thanks all! How long before it appears on the site? I just purged my cache to be sure it is not already out there before asking. |
@aardrian It should be fully deployed about 5-6 hours from now, and then it's a matter of when each page's CDN cache expires (at most 24 hours). So, at the latest, all pages should show this change 30 hours from now. Cheers. |
@schalkneethling First of all I'm really sorry for being not active on time(there was a lot things going with me lately, my exams and all).But when I said I want to work on this issue that time I tried my best to run yari locally but I couldn't. I would like to contribute to MDN docs for upcoming issues.I hope I will get help when I get stucked. |
No need to apologize @dhananjayd1729. Please let us know whenever you are ready and find something you are interested in. |
Sure @schalkneethling . Looking forward to contribute. |
* 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
MDN URL: https://developer.mozilla.org/en-US/docs/ (and all pages below)
Issue
None of the links within the content have an underline. They are difficult to distinguish from the surrounding content and require interaction to identify them in some cases.
The page content is dark gray (
#212121
) and the link color is dark blue (#00458b
). with a contrast ratio of 1.7:1, it is fair to assume most users with good vision under ideal conditions will have to take a second look.As it stands now, the content links would fail WCAG 2.1 Success Criterion 1.4.1 Use of Color. The non-normative G182 recommends using an additional visual cue besides color. G183 recommends a 3:1 contrast ratio and an additional visual cue on focus or hover, but is now mooted with the advent of touch interfaces. I go into more detail about alternatives to underlines in On Link Underlines.
Recommended fix
To restore underlines to links in the content…
In the file:
/node_modules/@mdn/minimalist/sass/atoms/_typography.scss
At line 69, please strike
text-decoration: none;
. Reference code with - preceding the line to strike:/* text links */ a:link, a:visited { color: $link-color; - text-decoration: none; &:hover, &:focus, &:active { text-decoration: underline; } }
In the file:
/node_modules/@mdn/minimalist/sass/atoms/_links.scss
At line 3, please strike
text-decoration: none;
. Reference code with - preceding the line to strike:a { color: $link-color; - text-decoration: none; &:hover, &:focus { text-decoration: underline; }
This will restore underlines to links in the navigation and elsewhere as well. If you want to remove those, I suggest more targeted removal of underlines scoped to just those areas to ensure underlines are retained on links outside the content.
If you would like to try the content with restored underlines without fiddling in the browser's dev tools, I have bookmarklet that will restore underlines (which I tested on MDN) at http://rosel.li/bookmarklets#underlines.
Specific section or headline?
Throughout.
What did you expect to see?
Underlines on links.
Did you test this? If so, how?
I tried to use the content.
MDN Content page report details
en-us/web/html/element
The text was updated successfully, but these errors were encountered: