wave | R Documentation |
This function provides an interface to the WebAIM WAVE accessibility evaluation API. It allows you to analyze web pages for accessibility issues and retrieve detailed reports.
wave(
key,
url,
format = NULL,
viewportwidth = NULL,
reporttype = NULL,
username = NULL,
password = NULL,
useragent = NULL,
toDataframe = FALSE,
file = NULL
)
key |
Character string. Your WAVE API key |
url |
Character string. URL of the webpage to analyze |
format |
Character string. Response format (optional) |
viewportwidth |
Integer. Viewport width for analysis (optional) |
reporttype |
Integer. Type of report to generate (1-4) (optional) |
username |
Character string. Username for protected pages (optional) |
password |
Character string. Password for protected pages (optional) |
useragent |
Character string. Custom user agent (optional) |
toDataframe |
Logical. Whether to convert results to a data frame (default: FALSE) |
file |
Character string. Optional file path to save JSON results |
List or tibble containing WAVE analysis results
## Not run:
# Basic usage
results <- wave(key = "your_api_key", url = "https://example.com")
# Get results as a data frame
df_results <- wave(key = "your_api_key", url = "https://example.com", toDataframe = TRUE)
# Save results to a temporary file
tmp_file <- file.path(tempdir(), "wave_results.json")
wave(key = "your_api_key", url = "https://example.com", file = tmp_file)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.