make_skiplinks: Transform an HTML element to a Skip Link

Description Usage Arguments Value Examples

View source: R/make_skiplinks.R

Description

Transform an HTML element to a Skip Link

Usage

1
make_skiplinks(element, skip_to, bg_color = "#002240", col = "#FFFFFF")

Arguments

element

the element to use as a Skip Link

skip_to

the HTML element to skip to

bg_color

the background color of the element to use as a Skip Link

col

the color of the element to use as a Skip Link

Value

a Skip Link HTML element

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
if (interactive()) {
  ui <- fluidPage(
    tags$a("do you want to be redirected to google.com ?",
      id = "skip-link"
    ) %>%
      make_skiplinks(
        skip_to = "https://google.com",
        bg_color = "red",
        col = "white"
      ),

    h1("accessibility is not a detail")
  )

  server <- function(input, output, session) {}

  shinyApp(ui, server)
}

savonliquide documentation built on Feb. 23, 2021, 1:07 a.m.