Skip to content

Commit

Permalink
cracked the links issue in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cjrace committed Sep 10, 2024
1 parent e96f99f commit 9ca7aa4
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 30 deletions.
5 changes: 3 additions & 2 deletions R/data-bad_link_text.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
#' check for in the `external_link()` function.
#'
#' We've started curating this list so we can create automated checks to help
#' all link text to be as descriptive as possible in line with WCAG 2.2 success
#' criteria 2.4.4: Link Purpose (In Context).
#' all link text to be as descriptive as possible in line with
#' [WCAG 2.2 success criteria 2.4.4: Link Purpose (In Context)](
#' https://www.w3.org/WAI/WCAG22/Understanding/link-purpose-in-context).
#'
#' @format ## `bad_link_text`
#' A data frame with 48 rows and 1 columns:
Expand Down
22 changes: 11 additions & 11 deletions R/external_link.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@
#'
#' This function automatically adds the following to your link:
#' * `target="_blank"` to open in new tab
#' * `rel="noopener noreferrer"` to prevent reverse tabnabbing
#' * `rel="noopener noreferrer"` to prevent [reverse tabnabbing](
#' https://owasp.org/www-community/attacks/Reverse_Tabnabbing)
#'
#' By default this function also adds "(opens in new tab)" to your link text
#' to warn users of the behaviour.
#'
#' This also adds "This link opens in a new tab" as a visually hidden span
#' element within the html outputted to warn non-visual users of the behaviour.
#'
#' Related links (aware of the painful irony but couldn't make the
#' documentation work in any other way!)...
#' Related links and guidance:
#'
#' Government digital services guidelines on the use of links:
#' https://design-system.service.gov.uk/styles/links/
#' * [Government digital services guidelines on the use of links](
#' https://design-system.service.gov.uk/styles/links/)
#'
#' Anchor tag html element and its properties:
#' https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a
#' * [Anchor tag html element and its properties](
#' https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)
#'
#' Web Accessibility standards link text behaviour:
#' https://www.w3.org/TR/WCAG20-TECHS/G200.html
#' * [WCAG 2.2 success criteria 2.4.4: Link Purpose (In Context)](
#' https://www.w3.org/WAI/WCAG22/Understanding/link-purpose-in-context)
#'
#' Reverse tabnabbing:
#' https://owasp.org/www-community/attacks/Reverse_Tabnabbing
#' * [Web Accessibility standards link text behaviour](
#' https://www.w3.org/TR/WCAG20-TECHS/G200.html)
#'
#' @param href URL that you want the link to point to
#' @param link_text Text that will appear describing your link, must be
Expand Down
4 changes: 2 additions & 2 deletions man/bad_link_text.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 8 additions & 15 deletions man/external_link.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9ca7aa4

Please sign in to comment.