make_tabable: Make HTML elements tabable

Description Usage Arguments Value Examples

View source: R/make_tabbable.R

Description

Make HTML elements tabable

Usage

1
make_tabable(element, tab_index = 0)

Arguments

element

the HTML element to be tabable (if not by default)

tab_index

takes either 0, a negative or a positive value according to the required state of the element. 0 will make the element tabable with its relative order defined by the platform convention. a negative value will make the element untabable. a positive value will make the element tabable and its relative order defined by the provided value.

Value

a tabable HTML element

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
if (interactive()) {
  ui <- fluidPage(
    textInput(inputId = "inp1", label = "input"),

    div(h1("Not tabable")) %>%
      make_tabable(tab_index = -1),
    div(h2("Tabable ! with priority")) %>%
      make_tabable(tab_index = 1),
    div(h2("Simply Tabable")) %>%
      make_tabable(tab_index = 0)
  )

  server <- function(input, output, session) {}

  shinyApp(ui = ui, server = server)
}

savonliquide documentation built on Feb. 23, 2021, 1:07 a.m.