Make private links more consistent across experiences #3637
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request:
Currently the Handbook marks private links (Google Docs, Slack, etc.) by adding the
private-link
CSS class, which uses the::after
selector to add a padlock emoji, and setting thetitle
attribute to "This link is private to TTS." However, as noted in #3543, this isn't a very friendly experience for people using screen readers. They are read something like this:This PR implements the guidance developed by the 18F Guides and Methods team in 18F/ux-guide#340:
private-link
class entirelylock_outline
iconWhen a screen reader lands on a private link, it now reads something more like:
In addition to private links, this PR also adds identification to external links. Any links out of gsa.gov will be marked external. Screen readers will announce that they are external and an icon is shown to sighted users. The screen reader announces something like this:
This also works with private links:
Visually, they end up looking like this:
![Screen Shot 2023-06-23 at 4 43 29 PM](https://private-user-images.githubusercontent.com/1775733/248410914-cd5f2c16-d89b-4c99-b8a5-f7ffafb7051b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MDQ0NjYsIm5iZiI6MTczOTYwNDE2NiwicGF0aCI6Ii8xNzc1NzMzLzI0ODQxMDkxNC1jZDVmMmMxNi1kODliLTRjOTktYjhhNS1mN2ZmYWZiNzA1MWIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTVUMDcyMjQ2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDk2Y2JhYTgxNjU0OWUyZDQ5ZDIxNzI0OGUyOGY1NTYyZmU0NWI0YzVhM2U5NWUwNTk0NDNjNWI0ODIxYzNkOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.1NShzM14dlDO3oL2rXQ9VwsAraGRrNTlVITBMVUIF6I)
Closes #3543
security considerations
None