Visual users get the context from the proximity to
the h2 but we need to provide this for others.
I've tried using `aria-describedby` to link them
to the h2 but this ends up making the h2 text the
button's description in the accessibility tree. In
Voiceover this means you only get that information
as extra context, announced a while after the
label if the VO cursor stays on the button.
We want all the information in the accessible
label so chose this approach instead.
Paired with @aliuk2012 on the implementation and
with a view to making the component generic enough
to be used on digital marketplace apps as well.
These changes came from that session.
They include:
- removal of an unused `data-accept-cookies`
attribute
- removal of `govuk-!-padding-top-4` class and
moving of associated styles into component CSS
- swapping out the `aria-label` on the parent
element for an `aria-describedby` linked to the
h2 to have one thing labelling the banner region
- removal of unused CSS and any already provided
by the govuk-button class
- inclusion of @import's for styles attached to
govuk-body and govuk-button classes
Includes:
- tests for the analytics interface ported from
GOVUK Frontend Toolkit
- tests for the cookie banner that appears on all
pages except the cookies page
- tests for the cookies page JS
- tests for the hasConsentFor function
- adding a deleteCookie helper to remove
cookies during tests
- polyfill for insertAdjacentText
The last one is because JSDOM doesn't support
insertAdjacentText but our target browsers
do. This polyfill also includes one for
insertAdjacentHTML.
Includes:
- new content
- added option to turn analytics on/off
- non-js version for the on/off switch
- a banner to confirm user's choice was saved,
shown when they click the save button
- the cookie banner that appears on all other
pages removed from this page
Removes the following cookies:
- seen_cookie_message (flags if banner was already
shown)
- _gid (Google Analytics cookie)
- _ga (Google Analytics cookie)
These were set by default before so potentially
still around for some users.
The code for this now exists as a static method on
the cookieMessage module and is called when the JS
loads for the first time.
Copies HTML and Sass from GOV.UK Pubishing
components cookie-banner with changes to content
and functionality to better suit Notify.
Changes are:
- adds a 'reject' button which the GOV.UK
code doesn't have
- adds Sass from the GOV.UK Frontend button
component which the GOV.UK version used so
is included here
- removed click tracking from cookie banner
Precompiled letters sent via the API don’t have:
- a template
- a filename
Which means in the list of returned letters we just show ‘None’. This
commit changes this to ‘Provided as PDF’, which is how we talk about
precompiled letters elsewhere (for example in the template statistics on
the dashboard).
Our table rows take up 65px vertical space.
We also have things that look like rows that say:
- there are no rows
- there are more rows than can be shown on screen
This commit makes them appear the same height.
It’s useful to get some kind of preview of the report before you
download it.
And if there’s only a few letters in there then you might not even need
to download it at all.
For teams with lots of letters we don’t want the page to load too slowly
so let’s cap the number of displayed items to 50, same as previewing
a spreadsheet.
This follows our pattern for other downloadable reports, and gives
people who know/care about stuff like file types some indication of what
they’re about to download.