Commit Graph

10576 Commits

Author SHA1 Message Date
Tom Byers
5819b5da2d Change context for cancel link
Every other control refers to the group name so
the cancel link should too.
2020-10-01 13:30:44 +01:00
Tom Byers
099b42b31e Make all control buttons aria-expanded=false
Suggested by the Digital Accessibility Centre in
their report. Giving these buttons
aria-expanded=false indicates:
- they control a section on the page
- that section is collapsed (and so clicking the
  button will open it)
2020-10-01 11:51:50 +01:00
Chris Hill-Scott
3182fc7668 Merge pull request #3659 from alphagov/pyup-scheduled-update-2020-09-28
Scheduled weekly dependency update for week 39
2020-09-30 12:58:21 +01:00
Chris Hill-Scott
06ae9d7162 Freeze requirements 2020-09-30 12:43:25 +01:00
pyup-bot
3dd7627316 Update eventlet from 0.27.0 to 0.28.0 2020-09-30 12:41:19 +01:00
Chris Hill-Scott
6c69ffb74c Merge pull request #3662 from alphagov/email-preview-page-title
Give email preview page a sensible page title
2020-09-30 11:40:54 +01:00
Chris Hill-Scott
a98e3534b2 Give email preview page a sensible page title
It’s derived from the subject line of the email now as of
https://github.com/alphagov/notifications-utils/pull/793
2020-09-30 11:29:13 +01:00
Chris Hill-Scott
eda47fc5e2 Merge pull request #3661 from alphagov/bump-utils-42.2.1
Bump utils to 42.2.1
2020-09-29 15:53:12 +01:00
Chris Hill-Scott
08a71cd297 Bump utils to 42.2.1
Changes: https://github.com/alphagov/notifications-utils/compare/42.2.0...42.2.1
2020-09-29 14:14:40 +01:00
Chris Hill-Scott
76f83f7d2a Merge pull request #3652 from alphagov/updated-bristol-boundaries
Update local authority district GeoJSON to bring in fixes for Bristol
2020-09-29 13:32:32 +01:00
Chris Hill-Scott
79be0dc472 Merge pull request #3651 from alphagov/shapefile-to-geojson
Add instructions for converting Shapefiles
2020-09-29 13:32:25 +01:00
Pea M. Tyczynska
f4f2e5d13a Merge pull request #3622 from alphagov/searchbox-make-autofocus-optional
Autofocus off by default on live-search
2020-09-29 10:58:00 +01:00
Tom Byers
2639406ae2 Simulate page load announcement in autofocus JS
Screenreaders announce the title of the page when
it loads and their users are used to it signifying
a new page.

By focusing a form control when the page loads,
this announcement is replaced with that of the
control label.

This commit prefixes the label with the page title so it
gets announced when the page loads, notifying
screenreader users that they are on a new page.

The page title prefix is removed once focus shifts
from the form control as its presence in any
further announcements could be confusing.
2020-09-29 10:47:13 +01:00
Leo Hemsted
65e32f8e5a Merge pull request #3650 from alphagov/broadcast-org-always-on
Broadcast org always on
2020-09-28 12:59:19 +01:00
Chris Hill-Scott
bb23e95a68 Merge pull request #3657 from alphagov/format-thousands-too-many-messages
Format big numbers correctly when numbers too big
2020-09-28 11:06:27 +01:00
Chris Hill-Scott
fbf23d4dd7 Merge pull request #3656 from alphagov/fix-typo-in-accessibility-statement
Remove 's' to fix typo
2020-09-28 11:06:17 +01:00
Chris Hill-Scott
6070874558 Merge pull request #3654 from alphagov/template-spacing-fixes
Restore correct spacing on templates page
2020-09-28 11:06:07 +01:00
Chris Hill-Scott
8da0aa7736 Format big numbers correctly when numbers too big
Comma should be used as the thousands separator. Code can be simplified
by using macro to pluralise.
2020-09-26 14:50:47 +01:00
karlchillmaid
eeb96dfb52 Remove 's' to fix typo 2020-09-26 11:42:07 +01:00
Chris Hill-Scott
6b1617c575 Merge pull request #3655 from alphagov/bump-utils-42.2.0
Bump utils to 42.2.0
2020-09-25 18:37:50 +01:00
Chris Hill-Scott
9afd305c6d Update test to new limit 2020-09-25 18:24:38 +01:00
Chris Hill-Scott
c763d3a44d Bump utils to 42.2.0
Increases CSV row limit from 50,000 to 100,000

Changes: https://github.com/alphagov/notifications-utils/compare/41.3.0...42.2.0
2020-09-25 18:16:17 +01:00
Leo Hemsted
626b1c4211 enable broadcast org in all environments
This organisation is defined in the config file. It's hard coded to a
UUID as defined in the api db migration 0331_add_broadcast_org.
2020-09-25 13:42:13 +01:00
Chris Hill-Scott
9e8df33832 Restore correct spacing on templates page
During the move to GOV.UK Frontend checkboxes our template list has
started to be wrapped in a `<div>` with the `govuk-form-group` class.

This adds extra spacing, like you’d want in a regular transaction
service which might have multiple sets of form controls on a single
page.

It isn’t appropriate on our templates page, because there should be a
consistent rhythm where the space between each checkboxes is the same as
the space between the search box and the first checkbox, to the last
checkbox and the buttons. Not having this space is also consistent with
other pages with sticky grey buttons, eg the team members page.

This commit also fixes a typo in the name of one of the classes used to
control spacing between the checkboxes and search bar.
2020-09-25 13:02:19 +01:00
Chris Hill-Scott
04e53c72b3 Update shapes to bring in fixes for Bristol
I emailed the Geography team at the ONS:

> Hi geography team,
>
> I work on GOV.UK Notify, which is a service run by Government Digital Service (part of the Cabinet Office). I was given your email address by [redacted] who’s been helping answer some of my questions on the cross-government Slack.
>
> We’re using some of the boundary datasets from the Open Geography Portal, and mostly they’ve been excellent.
>
> In the abstract, the problem we’re trying to solve is, given a point outside an area, what is the minimum distance to a point within that area. So, for example, if a crow was somewhere in Cardiff, what’s the shortest distance it would have to fly to reach somewhere in the Bristol local authority district?
>
> We’ve noticed some problems with the data that means our calculations would be wrong. We’ve noticed this around Torquay, Norwich and Bristol. Here are some screenshots of Bristol, from the generalised and full resolution boundaries:
>
> The artefacts I’ve highlighted are closer to Cardiff than any actual part of the land area of Bristol. They are either:
> - in the sea
> - land that’s part of North Somerset
>
> I suspect that this is being caused by the process of clipping the actual region of Bristol (which, unusually, extends into the water) to the mean high water line.
>
> I’ve worked around this by filtering out any polygons that are smaller than ~7,500m². It’s a bit hacky because parts of the Scilly Isles start disappearing. That’s not a problem for what I’m working on, but it would be nice to not need the hack.
>
> So my questions would be:
>
> - Is there a better way to remove these artefacts than filtering by area?
> - Is there a plan to remove these artefacts from the data in future releases?
>
> Thanks in advance,
> Chris

They emailed back to say:

> Hi Chris
>
> Thank you for your enquiry.
>
> We  have completed the amendments to the LAD MAY 2020 BFC and BGC boundaries as mentioned so you should be able to download them from the portal now.
>
> Hope this helps.
>
> Kind regards
> [redacted]

This commit brings in the files they’ve updated. We still have to do
some filtering (but now at a higher resolution) because they haven’t
fixed Norwich yet. I’ll email them  separately about that.
2020-09-25 12:24:23 +01:00
Chris Hill-Scott
ae0d31d71e Merge pull request #3653 from alphagov/more-map-refinements
Make the ‘will get alert’ and ‘likely to get alert‘ areas on the map clearer
2020-09-25 10:10:50 +01:00
Chris Hill-Scott
67bdd27dd0 Tweak position of key icons to align with text 2020-09-25 09:49:27 +01:00
Chris Hill-Scott
19730dad6e Rotate the map key icons
We’ve had some feedback that the map key icons look a bit like
checkboxes, and that this might have confused a user during the
research.

So we need a way of making them look different to checkboxes. We don’t
want to change the border thickness because it matches what’s on the
map. A different approach is changing the shape.

Shapes that might still be confusing:
- circles (look like radio buttons)
- triangles (look like a warning)

So this commit changes the shape to a diamond, which is easy to acheive
by rotating the square 45 degrees.
2020-09-24 16:15:31 +01:00
Chris Hill-Scott
f79a5ca020 Style ‘likely’ area with a dashed line
We’ve had some feedback that relying only on luminosity and position to
differentiate between the ‘will get alert’ and ‘likely to get alert’
areas on the map might not be enough.

We don’t want to introduce another colour because:
- it will make the map look very busy
- not many other colours contrast with the map tiles as well as blue
- relying on colour only to communicate information is also bad for
  accessibility

Instead we can make one of the lines a different style. I’ve gone for
dashed on the ‘likely’ line because it looks nice, and gives some
suggestion of a porous boundary.

Implementing this means using CSS border image, because a `dashed`
border (which we still have as a fallback) doesn’t render with
consistent dash sizes from browser to browser. We need consistency to
match the dashes that the map will be drawing (which use SVG not CSS
so don’t have the same problem).
2020-09-24 16:15:31 +01:00
Chris Hill-Scott
eb4a7907a4 Make estimated phone count clearer
We’ve had some feedback from user research that difference between
‘will get alert’ and ‘likely to get alert’ is not clear, and it’s hard
to tell if the latter is inclusive of the former. This leads people to
question the validity of these numbers, which is important, because an
the estimate should give you some idea of the impact of what you’re
about to do.

This commit reformats the number as a range, for example 1,000 to 2,000
phones.

If the range is small, eg 40,000,000 to 40,800,000 then this suggests
a false level of accuracy. So instead we just give one number and say
it’s an estimate, eg ‘40,000,000 phones estimated’
2020-09-24 15:53:07 +01:00
Chris Hill-Scott
e7169ad902 Add instructions for converting Shapefiles 2020-09-24 13:19:27 +01:00
Leo Hemsted
c7ef7d5083 Merge pull request #3643 from alphagov/broadcast-org
move service to broadcast org when broadcasting is enabled
2020-09-24 13:13:34 +01:00
Tom Byers
6cf7017ff5 Add tests for changes to label 2020-09-24 13:10:55 +01:00
Pea Tyczynska
a73573c165 Turn autofocus on for copy template
Accessibility audit uncovered issues screen-reader users would
have with autofocus on Notify pages. Autofocus can lead to
confusion for those types of users and make them miss parts
of the page.

Hence, we decided that autofocus will be turned off by default
for live-search component.

We decided to keep the autofocus on for live-search text box when:
1. the page is a task page - as opposed to browsing pages, where
user wonders freely, task pages have more established flow, so
page focusing on textbox can actually be helpful.
2. page does not have actionable elements above the autofocus.
2020-09-24 13:10:40 +01:00
Pea Tyczynska
2d512cb0fd Turn autofocus on for setting service branding
Accessibility audit uncovered issues screen-reader users would
have with autofocus on Notify pages. Autofocus can lead to
confusion for those types of users and make them miss parts
of the page.

Hence, we decided that autofocus will be turned off by default
for live-search component.

We decided to keep the autofocus on for live-search text box when:
1. the page is a task page - as opposed to browsing pages, where
user wonders freely, task pages have more established flow, so
page focusing on textbox can actually be helpful.
2. page does not have actionable elements above the autofocus.
2020-09-24 13:09:50 +01:00
Pea Tyczynska
7e7bb0c67d Turn autofocus on for link-service-to-organisation
Accessibility audit uncovered issues screen-reader users would
have with autofocus on Notify pages. Autofocus can lead to
confusion for those types of users and make them miss parts
of the page.

Hence, we decided that autofocus will be turned off by default
for live-search component.

We decided to keep the autofocus on for live-search text box when:
1. the page is a task page - as opposed to browsing pages, where
user wonders freely, task pages have more established flow, so
page focusing on textbox can actually be helpful.
2. page does not have actionable elements above the autofocus.
2020-09-24 13:07:42 +01:00
Pea Tyczynska
23497c839c Turn autofocus on for search in broadcast views
Accessibility audit uncovered issues screen-reader users would
have with autofocus on Notify pages. Autofocus can lead to
confusion for those types of users and make them miss parts
of the page.

Hence, we decided that autofocus will be turned off by default
for live-search component.

We decided to keep the autofocus on for live-search text box when:
1. the page is a task page - as opposed to browsing pages, where
user wonders freely, task pages have more established flow, so
page focusing on textbox can actually be helpful.
2. page does not have actionable elements above the autofocus.
2020-09-24 13:06:51 +01:00
Pea Tyczynska
d7637dcca4 Turn autofocus on for platform admin branding pages search boxes
Accessibility audit uncovered issues screen-reader users would
have with autofocus on Notify pages. Autofocus can lead to
confusion for those types of users and make them miss parts
of the page.

Hence, we decided that autofocus will be turned off by default
for live-search component.

We decided to keep the autofocus on for live-search text box when:
1. the page is a task page - as opposed to browsing pages, where
user wonders freely, task pages have more established flow, so
page focusing on textbox can actually be helpful.
2. page does not have actionable elements above the autofocus.
2020-09-24 13:04:53 +01:00
Pea Tyczynska
ad6dc670f1 Turn autofocus on for broadcast areas search box
Accessibility audit uncovered issues screen-reader users would
have with autofocus on Notify pages. Autofocus can lead to
confusion for those types of users and make them miss parts
of the page.

Hence, we decided that autofocus will be turned off by default
for live-search component.

We decided to keep the autofocus on for live-search text box when:
1. the page is a task page - as opposed to browsing pages, where
user wonders freely, task pages have more established flow, so
page focusing on textbox can actually be helpful.
2. page does not have actionable elements above the autofocus.
2020-09-24 12:55:30 +01:00
Pea Tyczynska
bd19b1171c Autofocus now optional for live_search
This change has been made because autofocus has been confusing
to users of screenreaders because they orient themselves by
what is in focus. Moving it when the page loads without warning
can cause confusion and mean they miss parts of the page
before the point focus has moved to.

So now we will only turn on autofocus if there are no other
elements in the page that need attention than the search box.
2020-09-24 12:27:10 +01:00
Chris Hill-Scott
fa54c0fec4 Merge pull request #3649 from alphagov/fix-training-styling-tour-5
Fix styling of ‘Training’ tag on tour step 5
2020-09-24 10:22:16 +01:00
Chris Hill-Scott
0482c62cb8 Fix styling of ‘Training’ tag on tour step 5
It was missing the base class so didn’t get all the styling (like the
spacing and uppercase text).

Already fixed this for step 6, but less haste, more speed.
2020-09-23 17:38:39 +01:00
Chris Hill-Scott
4f0347b26d Merge pull request #3646 from alphagov/remove-yellow
Replace uses of $yellow for focus
2020-09-23 16:32:14 +01:00
Chris Hill-Scott
c0be215068 Merge pull request #3648 from alphagov/fix-training-styling-tour-6
Fix styling of ‘Training’ tag on tour step 6
2020-09-23 16:22:02 +01:00
Chris Hill-Scott
59bf38e623 Fix styling of ‘Training’ tag on tour step 6
It was missing the base class so didn’t get all the styling (like the
spacing and uppercase text).
2020-09-23 16:03:05 +01:00
Chris Hill-Scott
cc456fa718 Merge pull request #3642 from alphagov/live-broadcast-tag
Show an indication that a broadcast service is live
2020-09-23 15:32:33 +01:00
Chris Hill-Scott
36dd974b7e Merge pull request #3647 from alphagov/local-colour
Don’t use $yellow to indicate local environment
2020-09-23 15:32:25 +01:00
Chris Hill-Scott
9becb2b817 Merge pull request #3641 from alphagov/area-suggestions
Suggest previously-used areas when adding new area
2020-09-23 15:00:21 +01:00
Tom Byers
cbb435b013 Merge pull request #3644 from alphagov/add-accessibility-statement
Add accessibility statement
2020-09-23 14:02:27 +01:00
Chris Hill-Scott
c8f0664bf7 Show an indication that a broadcast service is live
We want it to be very clear whether you’re in live or training mode
because:
- you may be switching back and forth between them
- doing something in live mode when you think you’re in training mode
  would have… consequences

By adding a label next to the service name you’ll will have some
indication, on every page, which mode you are in.

Style of the label is based on the ‘Tag’ component from the Design
System:
https://design-system.service.gov.uk/components/tag/#showing-multiple-statuses
2020-09-23 13:05:07 +01:00