set_roles: Add role attributes

Description Usage Arguments Details Value Examples

View source: R/attributes.R

Description

Add role language attribute to key Shiny widgets.

Usage

1
set_roles(session)

Arguments

session

Shiny session.

Details

You can inspect the element in your browser to verify the addition of role attributes for the following Shiny elements.

Value

nothing returned

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
if(interactive()){
  library(shiny)

  shinyApp(
    ui = fluidPage(
      use_access(),
      h3("App title"),
      tabsetPanel(
        tabPanel("panel1", "Content"),
        tabPanel("panel2", "Content")
      ),
      tabsetPanel(
        tabPanel("panel1", "Content"),
        tabPanel("panel2", "Content"),
        type = "pills", id = "tsp2"
      )
    ),
    server = function(input, output, session){
      set_roles(session)
    }
  )
}

leonawicz/shinyaccess documentation built on Aug. 15, 2020, 12:40 a.m.