Skip to content
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 5 commits into from
Mar 9, 2021
Merged

Update search box button #1957

merged 5 commits into from
Mar 9, 2021

Conversation

injms
Copy link
Contributor

@injms injms commented Mar 4, 2021

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:
image

And the layout header text has been updated:
Screenshot 2021-03-04 at 14 38 39

@bevanloon bevanloon temporarily deployed to govuk-publis-update-sea-bvjy5o March 4, 2021 14:04 Inactive
@injms injms marked this pull request as ready for review March 4, 2021 14:35
Copy link
Contributor

@owenatgov owenatgov left a 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.

@injms injms force-pushed the update-search-box-button branch from 29d5931 to 2de790c Compare March 8, 2021 16:14
@bevanloon bevanloon temporarily deployed to govuk-publis-update-sea-bvjy5o March 8, 2021 16:14 Inactive
@injms injms requested a review from owenatgov March 8, 2021 16:15
@bevanloon bevanloon temporarily deployed to govuk-publis-update-sea-bvjy5o March 8, 2021 16:17 Inactive
@injms injms force-pushed the update-search-box-button branch from 51749b5 to 4c2cf3d Compare March 8, 2021 16:19
@bevanloon bevanloon temporarily deployed to govuk-publis-update-sea-bvjy5o March 8, 2021 16:19 Inactive
@injms injms force-pushed the update-search-box-button branch from 4c2cf3d to cdcfdbc Compare March 8, 2021 16:32
@bevanloon bevanloon temporarily deployed to govuk-publis-update-sea-bvjy5o March 8, 2021 16:32 Inactive
Copy link
Contributor

@alex-ju alex-ju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

injms added 5 commits March 9, 2021 09:26
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 injms force-pushed the update-search-box-button branch from cdcfdbc to 3081283 Compare March 9, 2021 09:27
@bevanloon bevanloon temporarily deployed to govuk-publis-update-sea-bvjy5o March 9, 2021 09:27 Inactive
@injms injms merged commit c8e5670 into master Mar 9, 2021
@injms injms deleted the update-search-box-button branch March 9, 2021 09:37
DilwoarH pushed a commit that referenced this pull request Mar 9, 2021
Includes:
* Remove lists from summary action links ([PR #1956](#1956))
* Fix GOV.UK Frontend deprecation warning for component-guide print stylesheet ([PR #1961](#1961))
* Update search box button ([PR #1957](#1957))
* Adds Reorderable lists component ([PR #1905](#1905))
@DilwoarH DilwoarH mentioned this pull request Mar 9, 2021
This was referenced Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants