-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix duplicate page titles in places user journey #4072
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This line was creating a location error when the search result contained multiple authorities. You could see this on live on the multiple authorities search result page page title eg. "Error: Find a Disabled Students' Allowance assessment provider - GOV.UK" This PR already adds the correct page title for search result pages, but the location error would still get appended to that eg. "Find a Disabled Students' Allowance assessment provider: select an address - GOV.UKError: Find a Disabled Students' Allowance assessment provider - GOV.UK" The check added in this commit is the same as the check on line 17 to check if the multiple authorities template should be rendered (that line also checks if postcode is provided, but we already check for that on line 55 here). However, I'm not sure if my "fix" is the best way to handle this or if bypassing multiple authorities in this way could be introducing some other issue. Maybe we should why the places_not_found method from the model doesn't recognise multiple authorities as a valid result. I've tried to superficially compare how this is handled for the other postcode finders like local transaction but those use the location_api model instead.
hannalaakso
changed the title
Deduplicate places page titles
Fix duplicate page titles in places user journey
May 21, 2024
KludgeKML
reviewed
May 21, 2024
@@ -55,7 +55,7 @@ def location_error | |||
return LocationError.new(INVALID_POSTCODE) unless postcode_provided? | |||
return LocationError.new(INVALID_POSTCODE) if places_manager_response.invalid_postcode? | |||
|
|||
LocationError.new(NO_LOCATION) if places_manager_response.places_not_found? | |||
LocationError.new(NO_LOCATION) if places_manager_response.places_not_found? && !places_manager_response.addresses_returned? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks okay as a fix.
MartinJJones
approved these changes
May 21, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work on this and fixing the existing bug 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
De-duplicate places page titles by making the search result and select address page titles more descriptive.
Why
This issue with duplicated page titles was identified on a recent DAC audit of similar journeys. In the audit, screen reader users who carried out a postcode search had to explore the other pages in the journey to find out that the search result pages were different from the search index page since the page titles across the postcode finder journey were duplicated.
Trello card
How
Error: Find a Disabled Students' Allowance assessment provider - GOV.UK
. The check added in this PR stops the location error from happening when there have been addresses returned. This is the same as the check on line 17 of the places controller which checks if the multiple authorities template should be rendered (that line also checks if postcode is provided, but we already check for that on line 55).Screenshots
Find local family hub search result
Before
After
Find local family hub, select from multiple authorities
Before
After
Report child abuse to local council search result
Before
After
Report child abuse to local council, select from multiple authorities
Before
After
Find a Disabled Students' Allowance assessment provider search result
Before
After
Find a Disabled Students' Allowance assessment provider, select from multiple authorities
Before
After
Find a register office search result
Before
After
Find a register office, select from multiple authorities
Before
After