compare_accessibility: Compare Website Accessibility

View source: R/compare_accessibility.R

compare_accessibilityR Documentation

Compare Website Accessibility

Description

Main function to generate accessibility comparisons across multiple websites

Usage

compare_accessibility(
  input,
  api_key = NULL,
  site_names = NULL,
  plot_type = c("category_counts", "issues", "structure"),
  report_type = 1,
  theme = "light"
)

Arguments

input

Character vector. URLs to analyze or paths to JSON files

api_key

Character string. WAVE API key (required for URL analysis)

site_names

Character vector. Optional custom names for sites

plot_type

Character string. Type of visualization:

  • "category_counts": Compare main accessibility categories

  • "issues": Detailed breakdown of errors and alerts

  • "structure": Compare structural elements

report_type

Integer. WAVE report type (1-4)

theme

Character string. Visual theme for plot (default: "light")

Value

ggplot object containing the requested visualization

Examples

## Not run: 
# Compare multiple websites
p <- compare_accessibility(
  input = c("https://example.com", "https://example.org"),
  api_key = "your_api_key",
  plot_type = "category_counts"
)

# Save the plot to a temporary directory
ggsave(file.path(tempdir(), "accessibility_comparison.png"), p)

## End(Not run)

waetr documentation built on April 16, 2025, 5:11 p.m.