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

Add link icons for locked and external links #88

Merged
merged 11 commits into from
Oct 31, 2023
Merged

Conversation

igorkorenfeld
Copy link
Member

@igorkorenfeld igorkorenfeld commented Oct 19, 2023

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's transform.

This resolves the programmatic icon adding in TLC/#341

👓 Preview

@eric-gade eric-gade mentioned this pull request Oct 20, 2023
@igorkorenfeld igorkorenfeld marked this pull request as ready for review October 26, 2023 14:49
@igorkorenfeld igorkorenfeld requested review from jasnakai and removed request for adunkman, juliaklindpaintner and michelle-rago October 26, 2023 14:49
Copy link
Member

@juliaklindpaintner juliaklindpaintner left a 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.

@michelle-rago
Copy link
Member

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."

@igorkorenfeld
Copy link
Member Author

Thank you for catching those Michelle! You don't have to review the pages, but very much appreciate the ones that you did.

@juliaklindpaintner
Copy link
Member

juliaklindpaintner commented Oct 27, 2023

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.

@igorkorenfeld
Copy link
Member Author

igorkorenfeld commented Oct 27, 2023

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:

https://federalist-8bc0b42c-5fd0-4ae8-9366-cd9c265a4446.sites.pages.cloud.gov/preview/18f/guides/ik/link-icons/

Copy link
Contributor

@jasnakai jasnakai left a 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.

@igorkorenfeld
Copy link
Member Author

Created a new TLC issue (522) for the permalink structure issue.

@igorkorenfeld igorkorenfeld merged commit 5441224 into main Oct 31, 2023
@igorkorenfeld igorkorenfeld deleted the ik/link-icons branch October 31, 2023 19:20
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.

4 participants