diff --git a/R/a11y_panel.R b/R/a11y_panel.R index 6a17b7e..9bc3733 100644 --- a/R/a11y_panel.R +++ b/R/a11y_panel.R @@ -36,6 +36,8 @@ #' "26th April 2024", #' "2nd November 2024", #' issues_contact = "https://github.com/dfe-analytical-services/shiny-template", +#' publication_slug = "la-and-school-expenditure", +#' publication_name = "LA and school expenditure" #' ) a11y_panel <- function( dashboard_title, @@ -157,14 +159,23 @@ a11y_panel <- function( }, shiny::tags$h2("Feedback and contact information"), if (!is.null(publication_slug)) { - shiny::tags$p( - "If you need information on this website in a different format please see the parent ", - external_link(href = publication_slug, link_text = publication_name), - "publication." - ) - shiny::tags$p( - "More details are available on that service for alternative formats of this ", - "data." + shiny::tagList( + shiny::tags$p( + "If you need information on this website in a different format please see the", + " parent publication, ", + external_link( + href = paste0( + "https://explore-education-statistics.service.gov.uk/find-statistics/", + publication_slug + ), + link_text = publication_name + ), + "." + ), + shiny::tags$p( + "More details are available on that service for alternative formats of this ", + "data." + ) ) }, shiny::tags$p("We're always looking to improve the accessibility of this website. diff --git a/R/header.R b/R/header.R index 4f6d736..4f7142b 100644 --- a/R/header.R +++ b/R/header.R @@ -24,7 +24,7 @@ #' } header <- function(header) { shinyGovstyle::header( - logo = "/dfeshiny/DfE_logo_landscape.png", + logo = "dfeshiny/DfE_logo_landscape.png", main_text = "", secondary_text = header, main_link = "https://www.gov.uk/government/organisations/department-for-education", diff --git a/R/validation.R b/R/validation.R index 57a5332..0265756 100644 --- a/R/validation.R +++ b/R/validation.R @@ -7,7 +7,7 @@ validate_date <- function(date) { date_template <- lubridate::stamp("1 January 2020", orders = "dmy", quiet = TRUE) if (is.na(date_ld)) { valid <- FALSE - validation_message <- "is not in a valid date format, e.g. 8th Auguest 2024 or 08/08/2024." + validation_message <- "is not in a valid date format, e.g. 8th August 2024 or 08/08/2024." } else if (date_ld > Sys.time()) { valid <- FALSE validation_message <- "is in the future." diff --git a/tests/testthat/test-a11y_panel.R b/tests/testthat/test-a11y_panel.R index 756b045..db7b464 100644 --- a/tests/testthat/test-a11y_panel.R +++ b/tests/testthat/test-a11y_panel.R @@ -105,7 +105,7 @@ test_that("Accessibility dates are required", { date_reviewed = "12th November 2024", issues_contact = "https://github.com/dfe-analytical-services/shiny-template/issues" ), - "\"Geoff\" is not in a valid date format, e.g. 8th Auguest 2024 or 08/08/2024." + "\"Geoff\" is not in a valid date format, e.g. 8th August 2024 or 08/08/2024." ) expect_error( a11y_panel(