We don't need these anymore as all users will use the `one-off/step`
routes.
This has mostly involved tidying up the tests which are still a little
disorganised and not as good as I'd like but it's a step in the right
direction.
More refactoring is still possible to the routes, it may come in a later
PR if I have time.
The Digital Accessibility Centre (DAC) reported
that it was confusing that focus was moved to the
templates and folders search textbox when the page
loaded on the templates page.
We noted that this issue wasn't reported on the
page where you enter your SMS 2-factor code.
From this, we determined that pages with a single
task could benefit from focus moving to the part
of the page that lets you do that task.
Because of this we:
- found all the pages we shift focus on when they
load
- kept it for pages where the focus shift is
important for what users do on the page
- removed it for all other pages (including
templates)
The work was completed in:
https://github.com/alphagov/notifications-admin/pull/3622
This work also changed the label of the focused
element as a hack to get the page title read out.
This normally happens on load to indicate a
navigation has happened but didn't in Voiceover
when we focused an element on load.
After testing with JAWS and NVDA we found only
Voiceover does this. As Voiceover has the smallest
market share, and navigation can be inferred by
other mean, we removed it in:
https://github.com/alphagov/notifications-admin/pull/3673
That was deployed today.
As if this is chosen as default, then the template data will be stale as
they do not have the latest reply to address.
We are already doing this for create/update/delete for sms senders and
contact lists for letters, it was just the create we were missing for
email reply to addresses.
Doing this was helpful to Voiceover users as its
announcement of the label meant the page title
(normally announced onload) wasn't skipped.
This isn't the case with JAWS so, prefixing the
title makes it announce it twice.
JAWS has a lot more users and the title being
announced twice is more confusing than not at all
so this removes it.
with reset password email.
This is so when users reset their password they are still
redirected to pages they were meant to visit.
This change was done specifically so everyone who is meant to see
broadcast tour sees it, but it will improve lives of all users
who wanted to visit a page on Notify but then had to reset
their password in the process.
There is no real reason to have to support both 'one-off' steps and also
'test' steps when sending a one off notification. It's a lot of complex
code, just to now set the one of the placeholders in the session.
We make our code much simpler but no longer using the 'test' routes but
instead adding a new endpoint to set the notification recipient when
sending to yourself before continuing on with the rest of the 'one-off'
flow.
After this is deployed for a day then we can completely remove the
'test' routes and this will help remove a lot of code complexity.
We no longer need the `start_tour` page as this has been replaced with
the new `begin_tour` page.
We also no longer need to handle the `help` argument in the
`send_test_step` or `send_one_off_step` as these no longer are
responsible for the tour and don't need to show the help text.
Worth pointing out, the new tour joins into the send one off flow. When
doing a GET `check_tour_notification`, and submitting the form shown on
this page you are POSTed to `send_notification` with `help=3`. Also for
general sending of one off notifications, the POST to
`send_notification` is done with `help=0` which is a bit of a hack to
make sure that we don't show a back link on the `view_notification` page
for when someone gets there having just sent a one off notification.
This use of `help=0` may be a candidate for a refactor in the future as
it feels like a bit of a hacky way of doing things and is therefore not
as clear to developers what is going on.
Also removes the help argument from the csv routes used here. There is
no reason that we need to ever show help for CSVs and this is leftover
code from when we used to do the tour that way.
In a lot of browsers, the static position is 0px
anyway so there's no problem.
In IE11, the button sits to the left of the
paragraph above by default. Setting it in the CSS
fixes the issue.