diff --git a/DESCRIPTION b/DESCRIPTION index ee94774..26481d9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,11 +1,11 @@ Package: a11ytables Title: Create Spreadsheet Publications Following Best Practice -Version: 0.2.0.9001 +Version: 0.2.1 Authors@R: c( - person(given = "Crown Copyright", role = c("cph", "fnd")), person(given = "Matt", family = "Dray", role = c("aut", "cre"), email = "mwdray@gmail.com"), person(given = "Tim", family = "Taylor", role = "ctb"), - person(given = "Matt", family = "Kerlogue", role = "ctb") + person(given = "Matt", family = "Kerlogue", role = "ctb"), + person(given = "Crown Copyright", role = c("cph", "fnd")) ) Description: Generate spreadsheet publications that follow best practice guidance from the UK government's Analysis Function, with a focus on diff --git a/NEWS.md b/NEWS.md index 7cfb569..9818a8d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ -# a11ytables 0.2.0.9001 +# a11ytables 0.2.1 -* Hotfix: correct spelling error in installation instructions in README (#111). +* Bugfix: corrected spelling error in installation instructions in README (#111). +* Accessibility fix: display number of tables with text rather than a numeral (#109). # a11ytables 0.2.0 diff --git a/R/utils-workbook.R b/R/utils-workbook.R index 12bf4bd..90a4c1c 100644 --- a/R/utils-workbook.R +++ b/R/utils-workbook.R @@ -197,9 +197,24 @@ table_count <- nrow(content[content$tab_title == tab_title, ]) + if (table_count < 10) { + table_count <- switch( + as.character(table_count), + "1" = "one", + "2" = "two", + "3" = "three", + "4" = "four", + "5" = "five", + "6" = "six", + "7" = "seven", + "8" = "eight", + "9" = "nine", + ) + } + text <- paste( "This worksheet contains", table_count, - ifelse(table_count == 1, "table.", "tables.") + ifelse(table_count == "one", "table.", "tables.") ) openxlsx::writeData( diff --git a/man/a11ytables-package.Rd b/man/a11ytables-package.Rd index 5c0642a..1a73415 100644 --- a/man/a11ytables-package.Rd +++ b/man/a11ytables-package.Rd @@ -24,9 +24,9 @@ Useful links: Other contributors: \itemize{ - \item Crown Copyright [copyright holder, funder] \item Tim Taylor [contributor] \item Matt Kerlogue [contributor] + \item Crown Copyright [copyright holder, funder] } }