From f5d6452b5bd1b109e4766785938e388479fdf7f5 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Thu, 16 May 2024 11:38:12 -0400 Subject: [PATCH] More info about how to fix alt-text Fixes #2548 --- R/check-built.R | 3 ++- tests/testthat/_snaps/build-articles.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/R/check-built.R b/R/check-built.R index 4b3b84fa6..dc6e501bf 100644 --- a/R/check-built.R +++ b/R/check-built.R @@ -32,7 +32,8 @@ check_missing_images <- function(pkg, src_path, dst_path) { problems[grepl("^data:image", problems)] <- "" cli::cli_inform(c( x = "Missing alt-text in {.file {path_rel(src_path, pkg$src_path)}}", - set_names(problems, "*") + set_names(problems, "*"), + i = "Learn more in {.vignette accessibility}." )) } } diff --git a/tests/testthat/_snaps/build-articles.md b/tests/testthat/_snaps/build-articles.md index b936cb056..d0ea7fcdb 100644 --- a/tests/testthat/_snaps/build-articles.md +++ b/tests/testthat/_snaps/build-articles.md @@ -20,6 +20,7 @@ x Missing alt-text in 'vignettes/missing-images.Rmd' * kitten.jpg * missing-images_files/figure-html/unnamed-chunk-1-1.png + i Learn more in `vignette(accessibility)`. # can build article that uses html_vignette