This release is the transition to a stable v1.0.0. Functions and arguments that will be removed in v1.0.0 now give a deprecation warning that names what to use instead, so you can update your code before upgrading. Everything deprecated keeps working in this release.
insert_text() is now inset_text(). Its
text argument is now content, reflecting that
it accepts more than plain text; insert_text(text = ) gives
a single warning pointing to inset_text(content = ).banner() is now phase_banner(), with the
same arguments.tag_Input() is now gov_tag(), with the
same arguments.panel_output(inputId, main_text, sub_text) is now
confirmation_panel(inputId, title, content).gov_layout() is deprecated. Use
gov_main_layout(gov_row(gov_box(..., size = size)), inputID = inputID, width = width)
instead; the warning explains how each argument maps across. There is no
single-function replacement.contents_link() (deprecated in 0.2.0) will be removed
in v1.0.0. Its warning now explains that
service_navigation() is the recommended approach for
multi-page layouts, and that in-page anchor links should be ordinary
links to heading ids.word_count() is deprecated as it is no longer required:
text_area_Input(word_limit = ) now tracks and announces the
word count entirely client-side, so the server-side
word_count() observer can be deleted.header() arguments main_text,
secondary_text, main_link,
secondary_link, main_alt_text, and
secondary_alt_text will be removed in v1.0.0. The warnings
for the four link and alt text arguments now say that they have no
effect.govReactableOutput()’s heading_level now
takes an integer from 2L to 5L (default
2L). The "h2" to "h5" strings
still work for now, with a warning showing the integer to use.<inputId>error to <inputId>-error
(matching the hint id format <inputId>-hint). This
affects radio_button_Input(),
checkbox_Input(), date_Input(),
text_Input(), text_area_Input(),
file_Input(), and input_field().
error_on() and error_off() have been updated
to match and continue to work transparently; only custom CSS or JS that
targets #fooerror selectors needs updating to
#foo-error.full_width_overrides()
function. Use the new width argument on
header(), footer(),
phase_banner(), cookieBanner(),
service_navigation() and gov_main_layout()
instead (see below).bslib has moved from Suggests to
Imports, since the new gov_page() function
depends on it directly. If you install shinyGovstyle without its
Suggests dependencies, you’ll now get bslib
automatically; if you pin dependencies some other way, add
bslib to that list.size on
heading_text(), caption_size on
govTable() and govReactableOutput(), and
label_size on form inputs like
checkbox_Input()) now throw an error if given anything
other than "s", "m", "l", or
"xl". Previously an invalid value was accepted silently and
could produce broken styling.govReactable() gains a columns argument
for column-specific overrides, such as fixing a column’s decimal places
with reactable::colFormat(). Only the fields you set are
applied; any field you leave unset keeps govReactable’s GOV.UK default
for that column. Previously, passing a columns argument
through ... errored with
formal argument "columns" matched by multiple actual arguments
(#243).gov_page() function, a GOV.UK-flavoured wrapper
around bslib::page_fluid(). It sets
<html lang="en"> by default (screen readers use this
to choose the right pronunciation and voice), adds a
description argument for the page’s
<meta name="description"> tag, and a
width argument that sets a default width for every
shinyGovstyle component used inside it, so you don’t have to repeat
width = on each one. A component that sets its own
width always overrides the page default.header(), footer(),
phase_banner(), cookieBanner(),
service_navigation(), gov_main_layout() and
the deprecated gov_layout() gain a width
argument for building wider, dashboard-style layouts:
"standard" (the default, GOV.UK’s usual 960px content
width), "three-quarters" (three-quarters of the viewport,
never narrower than standard), "full" (edge-to-edge, with
grid gutters also removed), or a CSS length (e.g. "1400px",
"90vw") for a custom max-width.external_link()’s add_warning argument now
also accepts "icon", in addition to
TRUE/FALSE. Setting
add_warning = "icon" adds a small decorative arrow icon
after the link text, giving sighted users a visual warning that the link
opens in a new tab without repeating the “(opens in new tab)” text,
which is useful for grouped links (see the “Grouped links” section of
the “Headings and text” vignette). The icon is hidden from screen
readers, which get the same hidden warning as
add_warning = FALSE.update_page_title() function to update the browser
tab title from server code, mirroring
update_service_navigation(). Compose a title in the GOV.UK
recommended format "<page> | <service>" by
supplying both page_title and
service_name.service_navigation() gains auto_page_title
and page_title_suffix arguments. With
auto_page_title = TRUE (the default) the browser tab title
is kept in sync with the active nav link, both for direct clicks and for
programmatic navigation via
update_service_navigation().service_navigation_server() wires every nav link to
its tab panel in a single server-side call, eliminating the per-link
observeEvent() boilerplate that multi-page apps previously
needed.navigate_to() combines
updateTabsetPanel() and
update_service_navigation() into one call for programmatic
navigation (next / back buttons, footer shortcuts, modal links). Accepts
a panel argument when the nav link inputId and the tab
panel value differ.update_radio_button_Input() function, the
server-side companion to radio_button_Input() (mirroring
shiny::updateRadioButtons()). Use it to change the selected
option, choices, or label of a radio group from the server, for example
to keep a cookies settings radio in sync with a cookie banner choice.
See the new “Cookies and analytics” vignette.inset_text() (content),
confirmation_panel() (content),
noti_banner() (body_txt),
details() (help_text),
phase_banner() (label),
warning_text() (text), and
gov_summary() (info) now accept
shiny tag objects (e.g. shiny::tags$b("Bold"))
and shiny::tagList() values in addition to plain character
strings.gov_list() (list) and
accordion() (descriptions) now accept
shiny tag objects and shiny::tagList() values,
so list items and accordion sections can contain links and other rich
content. accordion() section content is no longer forced
into a single paragraph, so it can hold block content such as lists or
multiple paragraphs (plain-string sections are unchanged).label and hint_label /
hint_input arguments of label_hint(),
text_Input(), text_area_Input(),
date_Input(), select_Input(),
checkbox_Input(), and radio_button_Input() now
consistently accept plain strings, HTML strings, shiny tag
objects, and shiny::tagList() values. Previously labels
accepted HTML strings but not tags, while hints accepted tags but not
HTML strings.phase_banner() gains a feedback_url
argument that auto-generates the standard GOV.UK phase banner feedback
text (e.g. “This is a new service - your feedback (opens in new tab)
will help us to improve it.”), or contact-style text if
feedback_url is a mailto: link.
label is now optional, but exactly one of
label or feedback_url must be supplied.external_link() now natively supports
mailto: links: when href starts with
mailto:, the “opens in new tab” attributes, text, and icon
are all skipped, since a mailto link hands off to the mail client rather
than opening a new tab. Existing link-text validations still apply.service_navigation() now gives an error when two links
end up with the same inputID (for example "Page 1" and
"Page-1", which both become page_1), rather
than silently creating clashing links. The links
documentation now correctly says that inputIDs supplied in a named
vector are cleaned up in the same way as generated ones.
update_service_navigation(), navigate_to() and
service_navigation_server() now clean up the inputIDs you
pass them in the same way, so an id such as "Page-Two"
works in all of them. Previously they used the id as given, so it
silently failed to match the page_two link.service_navigation() link now has
aria-current="page", as in the GOV.UK Design System, so
screen readers announce which page is current. Previously only the
visual highlight changed. The first link is now marked as the current
page when the app loads.gov_tag() and value_box() now warn when
colour is not one of their supported colours (for example a
typo such as "gren"), listing the options, rather than
silently falling back to the default styling. A colour that
is not a single string now gives a clear error.button_Input(type = "start") now wraps a rich HTML
label in a span so it wraps correctly on narrow screens, following
GOV.UK Frontend 6.4.0.service_navigation() now syncs the browser tab title
with the active page by default. Screen readers announce the title on
navigation, so a static title is an accessibility issue for multi-page
dashboards. This is a behaviour change; set
auto_page_title = FALSE on
service_navigation() to restore the previous
behaviour.header() no longer emits spurious deprecation warnings
for main_link, secondary_link,
main_alt_text, and secondary_alt_text when
those arguments are not used.accordion() sections now operate independently of one
another, so expanding or collapsing sections in one accordion no longer
affects a different accordion on the same page.accordion() sections and the “Show all sections”
control now correctly announce their state via
aria-expanded, and toggling an individual section keeps the
“Show all sections” control’s text, chevron, and
aria-expanded state in sync.role="alert"
so they are announced by screen readers when toggled via
error_on().error_on(error_message = ...), which
previously replaced it.error_on() now escapes a plain string
error_message instead of sending it to the browser as raw
HTML, so it renders the same way as the message baked into the component
(< and & are no longer swallowed, and
interpolated user content can no longer inject markup). Pass a
shiny tag, shiny::tagList(), or
shiny::HTML() to render markup deliberately.date_Input() now renders its hint before the error
message, matching the GOV.UK Design System and the other input
components.govReactable() table row, sort-header, and pagination
highlights are now visible in Windows High Contrast / forced-colours
mode.details() now applies the same HTML handling to
help_text as it does to label, so HTML strings
render consistently across both arguments.warning_text() now renders HTML strings in
text consistently with other body-content components.govTable() no longer errors with “evaluation nested too
deeply: infinite recursion” on large tables (around 1200+ rows). It now
warns when given more than 50 rows and recommends
govReactable() for very large or interactive tables.radio_button_Input() client binding now correctly
replaces all options when sent an options update (the
previous selectors did not match the rendered markup, so option
replacement silently did nothing).radio_button_Input()’s client binding now correctly
reads and updates the group label
(update_radio_button_Input(label = ...), and Shiny’s
built-in bookmarking). The previous selector targeted the old
<label for=...> markup, which no longer exists now
that the label renders inside a <legend> via the
shared fieldset helper.govTable() now renders rows in dataframe order (row
order was previously silently reversed).text_area_Input()’s word-limit message is now a live
region (aria-live="polite"), announced to screen readers a
short pause after the user stops typing, matching the GOV.UK Design
System character count component. Previously it updated visually on
every keystroke but was never announced.radio_button_Input(), checkbox_Input(),
and date_Input() now wrap their contents in a
<fieldset> with a <legend>
(previously they used a <label> inside the fieldset,
which is invalid and meant screen readers did not announce the question
as group context). Any hint or error message is linked to the fieldset
via aria-describedby, so screen readers read the hint/error
when the group receives focus. radio_button_Input(),
checkbox_Input(), and date_Input() gain
label_size
("s"/"m"/"l"/"xl",
default "m") and heading_level (1-6, optional)
arguments that control the legend size and optionally wrap it as a page
heading following the GDS pattern.radio_button_Input() inputs and labels are now
programmatically associated via matching
id/for attributes, and checkbox labels now
also carry for attributes. date_Input()
Day/Month/Year labels are likewise associated with their underlying
inputs via for/id.govTabs now includes full ARIA roles
(tablist, tab, tabpanel) and
attributes (aria-selected, aria-controls,
aria-labelledby) so screen readers correctly identify and
navigate tabs.header() arguments main_text and
secondary_text have been renamed to org_name
and service_name respectively. The old names are deprecated
and will be removed in a future version.value_box() has had the redundant inputId
argument removed.download_link(), download_button(),
and download_radios() functions for download
components.external_link() function for creating safe,
accessible external links that open in a new tab.gov_list() function to render styled ordered and
unordered lists.service_navigation() function with
update_service_navigation() and
service_nav_link() helpers for the GOV.UK service
navigation component.skip_to_main() function to add a
skip-to-main-content accessibility link.footer() now supports links.gov_table() now supports reactive tables, sorting, and
pagination.gov_table() no longer crashes when
width_overwrite = NULL.header() alt text validation softened from errors to
warnings.header() has been fixed to correctly size and align on
small screens, and service_name now wraps correctly on
narrow viewports.value_box() updated to use GOV.UK tag colours.run_example for ease
of testing.gov_main_layout,
gov_row, gov_box and gov_text to
give better control over the layouts.govTab
command.gov_summary
command.error_summary) and error
summary update (error_summary_update).text_area function. You can change the
limit on word_count if needed.run_example to a better versions that show
more ways you can you the package.backlink_Input to a button so that you can
use server to move between panels etc.tag_Input function plus added to
the use_example.cookieBanner
function.accordion function.govTable function.NEWS.md file to track changes to the
package.