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

fix(a11y): move focus algolia-search focus back to search input on Escape #9945

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

mxschmitt
Copy link
Contributor

@mxschmitt mxschmitt commented Mar 12, 2024

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

When using Tab to navigate through the website and enter the Algolia search, type something but decide to go back (Esc) the focus gets lost. It should go back where it came from (search input).

Test Plan

  1. Tab through the page until you reach the Search input
  2. Press Enter to open the Popup
  3. Enter something and press Esc

Expected: Focus is back in the search input
Actual: Focus is lost

Test links

Deploy preview: https://deploy-preview-9945--docusaurus-2.netlify.app/

Related issues/PRs

Fixes #9917

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Mar 12, 2024
Copy link

netlify bot commented Mar 12, 2024

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 597ac72
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/65f0d3285ff5f000089e651f
😎 Deploy Preview https://deploy-preview-9945--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 58 🟢 98 🟢 96 🟢 100 🟠 88 Report
/docs/installation 🟠 66 🟢 96 🟢 100 🟢 100 🟠 88 Report
/docs/category/getting-started 🟠 75 🟢 100 🟢 100 🟢 90 🟠 88 Report
/blog 🟠 70 🟢 100 🟢 100 🟢 90 🟠 88 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 62 🟢 96 🟢 100 🟢 100 🟠 88 Report
/blog/tags/release 🟠 71 🟢 100 🟢 100 🟠 80 🟠 88 Report
/blog/tags 🟠 75 🟢 100 🟢 100 🟢 90 🟠 88 Report

@slorber slorber added pr: bug fix This PR fixes a bug in a past release. to backport This PR is planned to be backported to a stable version of Docusaurus labels Mar 14, 2024
@slorber
Copy link
Collaborator

slorber commented Mar 14, 2024

Thanks 👍 makes sense

@slorber slorber merged commit 7938803 into facebook:main Mar 14, 2024
34 checks passed
mxschmitt added a commit to microsoft/playwright.dev that referenced this pull request Mar 21, 2024
mxschmitt added a commit to microsoft/playwright.dev that referenced this pull request Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release. to backport This PR is planned to be backported to a stable version of Docusaurus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Accessibility]: Page looses focus after Search modal gets closed
3 participants