Automattic / Automattic/jetpack

Search: Search form trigger change of context without user choice

Open
#23,394 1 comment 0 reactions 1 assignee Claimed by @bluefuton View on GitHub
[Feature] Search [Focus] Accessibility [Plugin] Jetpack [Pri] Normal Bug
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

### Impacted plugin
Jetpack

### Issue
Typing text into the search form auto-triggers the search modal. There's a fundamental problem with changing the user context without their choice, but this also creates a more serious bug: if the user attempts to exit the modal using the keyboard (by clicking 'close'), then focus is passed back to the input form, which then automatically re-opens the modal.

This doesn't happen if the user clicks 'close' with a mouse or if the user leaves the modal using the Esc key; but triggering 'close' from the keyboard creates a loop.

![CleanShot 2022-03-11 at 14 09 16](https://user-images.githubusercontent.com/42279181/157967105-2274c589-6bc0-4679-9131-168612f09b17.gif)

### Other Information
This issue was surfaced to team 51 by an a11y contractor working on a partner site.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.