| a11y_actionButton | R Documentation |
A wrapper for shiny::actionButton() with ARIA attributes according to
BITV 2.0, enforced visible label or aria-label, and custom CSS class.
a11y_actionButton(
inputId,
label = NULL,
icon = NULL,
aria_label = NULL,
aria_controls = NULL,
...
)
inputId |
Button ID |
label |
(optional) Visible label |
icon |
(optional) Icon, e.g. |
aria_label |
(optional, but required if |
aria_controls |
(optional) ARIA controls attribute |
... |
Additional arguments for |
HTML <button> tag with appropriate ARIA attributes
# Button with a visible label
a11y_actionButton("btn1", label = "Submit")
# Icon-only button (aria_label required)
a11y_actionButton("btn2",
icon = shiny::icon("search"),
aria_label = "Search"
)
# Button with aria-controls linking to another element
a11y_actionButton("btn3",
label = "Toggle",
aria_controls = "panel1"
)
# Button with visible label, icon, and additional aria-label
a11y_actionButton("refresh",
label = "Refresh",
icon = shiny::icon("refresh"),
aria_label = "Click to refresh data"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.