diff --git a/DESCRIPTION b/DESCRIPTION
index cf3cd5f..ff01c38 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
Package: nflplotR
Title: NFL Logo Plots in 'ggplot2' and 'gt'
-Version: 1.4.0.9001
+Version: 1.4.0.9002
Authors@R:
person("Sebastian", "Carl", , "mrcaseb@gmail.com", role = c("aut", "cre"))
Description: A set of functions to visualize National Football League
diff --git a/NEWS.md b/NEWS.md
index 5357713..70d6e18 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -3,6 +3,7 @@
* Updated the New York Jets logo (again) to their new secondary logo introduced in the 2024 off-season. This aligns with the logo used across nfl dot com and it has been voted for in a poll. (#68)
* The theme elements `element_nfl_logo()` and `element_nfl_wordmark()` now clean team abbreviations by calling `nflreadr::clean_team_abbrs()` and insert empty grobs for mismatches.
* All geoms and theme elements will print more informative warnings about team abbreviation, or player ID mismatches.
+* The gt logo rendering functions now add alt text for accessibility and to silence an annoying pkgdown warning. (#69)
# nflplotR 1.4.0
diff --git a/R/gt_nfl.R b/R/gt_nfl.R
index 077dd39..d010e87 100644
--- a/R/gt_nfl.R
+++ b/R/gt_nfl.R
@@ -140,7 +140,15 @@ gt_nfl_cols_label <- function(gt_object,
# Create the image URI
uri <- get_image_uri(team_abbr = team_abbr, type = type)
# Generate the Base64-encoded image and place it within
tags
- out <- paste0("
")
+ out <- paste0(
+ "
"
+ )
# If the image uri returns NA we didn't find a match. We will return the
# actual value then to avoid removing a label
out[is.na(uri)] <- x[is.na(uri)]
@@ -176,7 +184,15 @@ gt_nflplotR_image <- function(gt_object,
# Create the image URI
uri <- get_image_uri(team_abbr = team_abbr, type = type)
# Generate the Base64-encoded image and place it within
tags
- out <- paste0("
")
+ out <- paste0(
+ "
"
+ )
out <- lapply(out, gt::html)
# If the image uri returns NA we didn't find a match. We will return the
# actual value then to allow the user to call gt::sub_missing()
diff --git a/nflplotR.Rproj b/nflplotR.Rproj
index 69fafd4..630d7e3 100644
--- a/nflplotR.Rproj
+++ b/nflplotR.Rproj
@@ -1,4 +1,5 @@
Version: 1.0
+ProjectId: 4cc57ef7-8811-41ca-a4f1-12c67158ba76
RestoreWorkspace: No
SaveWorkspace: No