| a11y_numericInput | R Documentation |
A wrapper for shiny::numericInput() with ARIA attributes according to
BITV 2.0, enforced visible label, optional heading annotation, custom CSS
class, and sr-only description support.
a11y_numericInput(
inputId,
label,
value,
min = NA,
max = NA,
step = NA,
...,
describedby = NULL,
describedby_text = NULL,
heading_level = NULL,
aria_controls = NULL
)
inputId |
Input ID |
label |
Visible label (required) |
value |
Initial numeric value |
min |
Minimum value (optional; |
max |
Maximum value (optional; |
step |
Step size (optional; |
... |
Additional arguments for |
describedby |
ID of help text for |
describedby_text |
Creates an sr-only |
heading_level |
1–6, marks the visible |
aria_controls |
(optional) ARIA controls attribute |
HTML tag of the input component
# Basic numeric input
a11y_numericInput("age", "Age", value = 30, min = 0, max = 120)
# With heading-level annotation and description
a11y_numericInput("score", "Score",
value = 0,
min = 0, max = 100,
heading_level = 3,
describedby_text = "Enter a value between 0 and 100"
)
# Linking to an existing help-text element by its ID
a11y_numericInput("seed", "Seed",
value = 123,
describedby = "seed_help"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.