Description Usage Arguments Value Examples
View source: R/add_description.R
Add a description to an HTML element
1 | add_description(element, descID, description, visible = FALSE)
|
element |
an HTML element to describe |
descID |
the ID of the div that will describe the HTML element |
description |
the description of the HTML element |
visible |
should the description be visible ? Defaults to FALSE |
an HTML element with a description attached to it
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 30 31 32 33 34 35 36 37 38 39 40 | if (interactive()) {
ui <- fluidPage(
h2("Using a screen reader
hit <Tab> or <Shift + Tab> to
navigate between the buttons
and stop at button 5 to see the difference"),
actionButton(
inputId = "inp1",
label = "button 1"
),
actionButton(
inputId = "inp2",
label = "button 2"
),
actionButton(
inputId = "inp3",
label = "button 3"
),
actionButton(
inputId = "inp4",
label = "button 4"
),
actionButton(
inputId = "inp5",
label = "button 5"
) %>%
add_description(
description = "hello this is a button
when you click it you'll have a
thing, when you don't click it you'll
have another thing",
descID = "chkoup"
)
)
server <- function(input, output, session) {}
shinyApp(ui, server)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.