| a11y_dateInput | R Documentation |
A wrapper for shiny::dateInput() with ARIA attributes according to
BITV 2.0, enforced visible label, optional heading annotation, custom CSS
class, and sr-only description support.
a11y_dateInput(
inputId,
label,
value = NULL,
min = NULL,
max = NULL,
format = "yyyy-mm-dd",
startview = "month",
weekstart = 1,
language = "en",
width = NULL,
...,
describedby = NULL,
describedby_text = NULL,
heading_level = NULL,
aria_controls = NULL
)
inputId |
Input ID |
label |
Visible label (required) |
value |
Initial date value (Date or string, optional) |
min |
Minimum date (optional) |
max |
Maximum date (optional) |
format |
Date format (as in |
startview |
Initial view ( |
weekstart |
First day of the week (1 = Monday, default: |
language |
Language for the datepicker (default: |
width |
Control width (optional) |
... |
Additional arguments for |
describedby |
ID of an element 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 (possibly with sr-only description)
# Basic date input
a11y_dateInput("start", "Start date")
# With German datepicker, custom format and description
a11y_dateInput("birthday", "Date of birth",
format = "dd.mm.yyyy",
language = "de",
describedby_text = "Enter your date of birth"
)
# Date input with heading-level annotation
a11y_dateInput("mydate", "Select date:",
language = "de",
heading_level = 2
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.