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

Only control focus when toggling Popover #1046

Merged
merged 4 commits into from
Jul 20, 2021

Conversation

connor-baer
Copy link
Member

Purpose

Currently, the Popover immediately hijacks the focus when rendered. It should only control the focus when toggled.

Approach and changes

  • Keep track of the previous open state and only move the focus when the open state changes.

Definition of done

  • Development completed
  • Reviewers assigned
  • Unit and integration tests
  • Meets minimum browser support
  • Meets accessibility requirements

@connor-baer connor-baer added 🐞 bug Something isn't working as it should ♿ accessibility Improves usability labels Jul 20, 2021
@connor-baer connor-baer requested a review from a team as a code owner July 20, 2021 08:35
@changeset-bot
Copy link

changeset-bot bot commented Jul 20, 2021

🦋 Changeset detected

Latest commit: 61d11cf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sumup/circuit-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov
Copy link

codecov bot commented Jul 20, 2021

Codecov Report

Merging #1046 (61d11cf) into next (9a35c9a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             next    #1046   +/-   ##
=======================================
  Coverage   91.58%   91.58%           
=======================================
  Files         164      164           
  Lines        2780     2782    +2     
  Branches      813      814    +1     
=======================================
+ Hits         2546     2548    +2     
  Misses        211      211           
  Partials       23       23           
Impacted Files Coverage Δ
packages/circuit-ui/util/test-utils.tsx 100.00% <ø> (ø)
packages/circuit-ui/components/Popover/Popover.tsx 96.00% <100.00%> (+0.10%) ⬆️

@vercel
Copy link

vercel bot commented Jul 20, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/sumup/oss-circuit-ui/2hxcSngknJnN7ncZaQuZXhdqyLqN
✅ Preview: https://oss-circuit-ui-git-bugfix-popover-initial-focus-sumup.vercel.app

Co-authored-by: Robin Métral <robin.metral@sumup.com>
@connor-baer connor-baer merged commit a39ee22 into next Jul 20, 2021
@connor-baer connor-baer deleted the bugfix/popover-initial-focus branch July 20, 2021 15:13
This was referenced Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
♿ accessibility Improves usability 🐞 bug Something isn't working as it should 🗂 circuit-ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants