Global Search - Header Search Aria Support
Intro
This change is broken off from !66007 (closed)
Work towards #297396 (closed)
This change is behind a feature flag (:new_header_search
)
Feature Flag Rollout Issue: #339348 (closed)
This end goal here is to replace the large deprecated jquery component used for the Header Search: https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/search_autocomplete.js
Replacing it with GitLab UI will allow us to add features more effectively as well as true up the styles permanently by using the GitLab UI component.
What does this MR do?
This MR is the 6th and final MR in a series for a full refactor of the deprecated component mentioned above. Here we are adding screen reader and aria-tag support.
IMPORTANT: There are some known bugs that have follow up issues:
-
The
NVDA
experience on all browsers interrupts thearia-live
reading yet it is displayed in the speech log. This means it never will say "5 default results provided..." (#346394) -
The
VoiceOver
experience on Firefox ignores allaria-live
changes. This means it never says any updated information about the search loading and its results. (#346391)
Here is a full roadmap for when the features were added: #297396 (comment 665578315)
Screenshots or Screencasts (strongly suggested)
Voiceover w/ Mac
NVDA w/ Windows
How to setup and validate locally (strongly suggested)
- Fetch and checkout this branch
- From your GDK terminal, access the rails console by typing
rails c
- Enable the feature flag by typing
Feature.enable(:new_header_search)
- Navigate to your GDK homepage (
http://127.0.0.1:3000/
)
How to activate Voiceover on Mac
- Open the "Accessibility" settings
- Click "VoiceOver" and check the box to activate it.
How to activate NVDA on Mac (w/ VirtualBox)
Follow this guide: https://gitlab.com/gitlab-org/gitlab-services/design.gitlab.com/-/blob/main/doc/nvda-setup.md
How to test
note: there are some known bugs listed above in the description dependent on your browser and screen reader
- Navigate to the header search using your keyboard and screen reader active
- Focus input
- Ensure it says that you are on an input
- Ensure it then says "5 Default items provided, use arrow keys..."
- Ensure it then says "Type for suggestions to appear..."
- Type a search
- Ensure it then says "Search is loading..."
- Browser dependent: ensure it says "${search} in all GitLab"
- Ensure it then says "X results updated. Use arrow keys..."
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.