An experimental R package to assess the alternative (alt) text from a web page.
Scrape image element attributes from a webpage, detect alternative (alt) text and assess it with simple heuristics. Alt text is important for users of assistive technologies, like screen readers, for understanding the content of images. This package should be used in conjunction with other accessibility assessment tools for more comprehensive coverage.
Install from GitHub using the {remotes} package:
install.packages("remotes")
remotes::install_github("matt-dray/altcheckr")
library(altcheckr)
There are two major functions for now:
alt_get()
creates a tibble of HTML attributes for each ‘img’ element on a supplied web pagealt_check()
performs basic checks of the alt text for each imageSee the ‘introduction to {altcheckr} functions’ vignette for more information: run vignette("introduction", altcheckr)
or visit the {altcheckr} website.
Right now, the alt_check()
function flags when alt text:
And it also:
Please note that the ‘altcheckr’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.