-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add link icons for locked and external links #88
Conversation
850091e
to
db4a815
Compare
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.
I poked through a few of the guides and it all looked good to me! I'm seeing the locks and the launch icons show up in what seem to be the appropriate places.
There are external link icons for digital.gov links (and other federal gov links) on https://federalist-8bc0b42c-5fd0-4ae8-9366-cd9c265a4446.sites.pages.cloud.gov/preview/18f/guides/ik/link-processing/accessibility/. Examples: Section 508, Accessibility for Teams, USWDS. This page has external link icons on a digital.gov link and on the TTS handbook https://federalist-8bc0b42c-5fd0-4ae8-9366-cd9c265a4446.sites.pages.cloud.gov/preview/18f/guides/ik/link-processing/product/resources/. Should I be reviewing these pages? Side note: The HTML page title on https://federalist-8bc0b42c-5fd0-4ae8-9366-cd9c265a4446.sites.pages.cloud.gov/preview/18f/guides/ik/link-processing/ is "Home | 18F 18F Approaches." |
Thank you for catching those Michelle! You don't have to review the pages, but very much appreciate the ones that you did. |
Sorry for my less than thorough review and thank you for clarifying that our review wasn't necessary and already taking steps to address the auto-tagging of reviewers. I did happen to just notice at the top of this page that it looks like there are empty parentheses at the end of the first paragraph of text that is supposed to preview the lock icon, I believe. That may be an issue across other guides resources pages as well if that same paragraph is included, too. |
No worries at all, and thank you for pointing that out! I will take a look. For any other reviewers, I noticed that my original preview link was going to the wrong branch. I've updated it in the PR description, but just for extra clarity the correct one is: |
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.
These look good to me. I did notice the empty parentheses that Julia pointed out. I'm not sure that is how to properly display the icon without the anchor link markup. So not sure if this is an issue for this PR.
Also noticed that the permalink icons are not properly structured for accessibility but that is not part of this PR.
Created a new TLC issue (522) for the permalink structure issue. |
Changes proposed in this pull request:
This PR adds a "lock" icon for links that are private (e.g. require a login or account) and the USWDS "launch" icon for external links. Based on 18F/ux-guide#297 external links are defined as "Any link that is not a federal .gov or .mil website". There seems to be no way to programmatically distinguish between a federal and a non-federal .gov domain. As such, the check for external domains only looks for a ".gov" TLD, and therefore will not label non-federal .gov domains as external automatically. There are only a handful of non-federal .gov links used throughout our guides, and those will need to be tagged manually.
The implementation is based on the approach used in the 18F handbook, but uses the renderer in
markdown-it
instead of 11ty'stransform
.This resolves the programmatic icon adding in TLC/#341
👓 Preview