-
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
Update search box button #1957
Merged
Merged
Update search box button #1957
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
owenatgov
reviewed
Mar 4, 2021
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.
Drive by review. Looking tidy overall 👍 I can give this a proper test later on today.
app/views/govuk_publishing_components/components/layout_header/_search.html.erb
Outdated
Show resolved
Hide resolved
app/views/govuk_publishing_components/components/_search.html.erb
Outdated
Show resolved
Hide resolved
injms
force-pushed
the
update-search-box-button
branch
from
March 8, 2021 16:14
29d5931
to
2de790c
Compare
injms
force-pushed
the
update-search-box-button
branch
from
March 8, 2021 16:19
51749b5
to
4c2cf3d
Compare
injms
force-pushed
the
update-search-box-button
branch
from
March 8, 2021 16:32
4c2cf3d
to
cdcfdbc
Compare
alex-ju
approved these changes
Mar 9, 2021
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.
🙌
Adds ability to change the visually hidden text inside the search box button.
Having the heading search button labelled "Search" clashed with a lot of the finders, which also had a button labelled "Search" on it. This is beause screen readers can collate and read out form fields, so having duplicate submit button text could lead to confusion. Changing this to "Search GOV.UK" makes the intent of this form clearer.
Quoting strings helps to avoid YAML's 🇳🇴 Norway problem. These were mostly double quotes to begin with, so that's been made consistent.
injms
force-pushed
the
update-search-box-button
branch
from
March 9, 2021 09:27
cdcfdbc
to
3081283
Compare
DilwoarH
pushed a commit
that referenced
this pull request
Mar 9, 2021
Merged
This was referenced Mar 11, 2021
This was referenced Mar 11, 2021
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Closed
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
Adds the ability to set the visually hidden text in the search box button component.
Updates layout heading to use the search box component with the button text "Search GOV.UK".
Why
Duplicate buttons on a page - for example, two buttons for different forms that both have the text "Search" - can lead to confusion for people who use assistive tech. Screen readers can collate all of the forms and buttons on a page, so duplicate text would make it harder to understand which button did what. Voice control relies on unique text, so saying "Click search" may end up with the wrong search button being clicked.
Visual Changes
No visual changes; the visually hidden text will be customisable:
And the layout header text has been updated: