User story
As an anonymous user
I want a visual representation of which keyword I have searched on
So that it's very clear which results I am seeing
As an anonymous user using screen reading technology
I want my screen reader to tell me I am viewing a results from my search /
And the keyword I searched on
So that it's clear if my search has been successful
And so that I have the same experience as a sighted user
Description
It was noted on a project that when a search is performed on the search page or on an Automated list (when the Title filter is exposed) that there was nothing in the code to tell a screen reader a search had been performed nor anything that told what keyword was searched.
We want to update this so that:
- The page title in the tab updates to tell the user the page is showing results for the keyword (on the Search page and on pages that have an Automated list)
- Update the message below the search field (on the Search page and on pages that have an Automated list)
- Additionally, on the Search page, update the heading above the Search field
Acceptance criteria
Automated list
AC 1 - Automated list - update page title in browser tab
GIVEN I’m an anonymous user using screen reading technology to read out page content
WHEN I apply a search on an Automated list
THEN when the page reloads the page title in the tab tells shows I am viewing search results for the specific keyword I searched
AND screen reading technology will read that page title
AC 2 - Automated list - Update the results message on the Automated list
GIVEN I’m an anonymous user
WHEN I apply a search on an Automated list
Then the results message updates to include the keyword/s: Showing 1 - 12 of 51 results for '[Keywords]'
Search
AC 3 - Search page - update the heading above search field
GIVEN I’m an anonymous user
AND I'm on the Search page
WHEN I view the heading above the search field
Then the the heading says Search keywords
AND it is styled as a Heading 2 but not tagged as H2
AC 4 - Search page - update the default results message
GIVEN I’m an anonymous user
AND I'm on the Search page
WHEN I view the search results message before I have performed a search
THEN it says Showing 1 - 25 of [total number]
AC 5 - Search page - update the results message on the Automated list
GIVEN I’m an anonymous user
WHEN I apply a search on the Search page
Then the results message updates to include the keyword/s: Showing 1 - 12 of 51 results for '[Keywords]'
AC 6 - Search page - update page title in browser tab
GIVEN I’m an anonymous user using screen reading technology to read out page content
WHEN I apply a search on the Search page
THEN when the page reloads the page title in the tab tells shows I am viewing search results for the specific keyword I searched
AND screen reading technology will read that tab content
Comments
Comment #2
alan.cole commentedComment #3
alan.cole commentedPR: https://github.com/civictheme/monorepo-drupal/pull/1429
Comment #4
fionamorrison23 commentedComment #5
fionamorrison23 commentedComment #6
richardgaunt commentedComment #7
richardgaunt commentedComment #9
fionamorrison23 commentedComment #10
fionamorrison23 commentedComment #11
richardgaunt commentedComment #12
richardgaunt commented