简体   繁体   中英

adding alt text tags to slickR carousel in R

Colleagues and I are building a website in R-Markdown (basic, not blogdown, distillR, etc.) and have a couple slide carousels created using the slickR package. The code looks like:

library(slickR)

images <- c("Slide1.JPG", "Slide2.JPG", "Slide3.JPG", "Slide4.JPG", "Slide5.JPG")
test <- slickR(obj = images, height=350, width='100%') 
test

I have Googled around and cannot find a way to add alt text tags so that as you swipe from side to side you get text a screen reader can read. Is this possible? If so how? Or, are there other ways to make the carousel accessible?

Thanks!

Following vignette for slickR with DOMS

library(slickR)

images <- c("Slide1.JPG", "Slide2.JPG", "Slide3.JPG", "Slide4.JPG", "Slide5.JPG")
imgs_bare <- mapply(function(x,txt){
  htmltools::tags$img(src = x, title = txt)
},x = nba_player_logo$uri[c(1:5)],txt = images,SIMPLIFY = FALSE)
slickR(obj = imgs_bare, height=350) 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM