describe_using: Describe an HTML element by another one

Description Usage Arguments Value Examples

View source: R/add_description.R

Description

Describe an HTML element by another one

Usage

1
describe_using(element, descID)

Arguments

element

the HTML element to describe

descID

one or a vector of many HTML elements' <IDs> that will be used to describe the 'element' parameter

Value

an HTML element described by another HTML element

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
if (interactive()) {
  ui <- fluidPage(
    h2("Using a screen reader
        hit Tab and Shift + Tab to
        navigate between the buttons
        and stop at button 2 to see the difference"),

    div(
      id = "paragraph",
      p("The following paragraph tag will be used as a descriptor")
    ),

    actionButton(
      inputId = "inp1",
      label = "button 1"
    ),
    actionButton(
      inputId = "inp2",
      label = "button 2"
    ) %>%
      describe_using(
        descID = "paragraph"
      )
  )

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

  shinyApp(ui, server)
}

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