Description Usage Arguments Value Examples
View source: R/add_description.R
Describe an HTML element by another one
1 | describe_using(element, descID)
|
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 |
an HTML element described by another HTML element
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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.