Skip to content

Commit

Permalink
Guide Cue close button not auto-focused
Browse files Browse the repository at this point in the history
  • Loading branch information
mmeigs committed Sep 17, 2024
1 parent 3c54a59 commit 6ab4257
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/components/ActionBar/DarkModeGuideCue.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ const GuideCueHeader = styled.div`
justify-content: center;
`;

const FocusTrapInvisibleButton = styled.button`
border: none;
outline: none;
width: 0;
height: 0;
padding: 0;
margin: 0;
position: absolute;
`;

const VideoContainer = styled.div`
width: 242px;
overflow: hidden;
Expand Down Expand Up @@ -110,6 +120,8 @@ const DarkModeGuideCue = ({ guideCueRef }) => {
>
<GuideCueContent>
<GuideCueHeader>
{/* Invisible button to trap focus. Ask from design to not have close button auto-focused */}
<FocusTrapInvisibleButton />
<CloseButton
onClick={onClose}
className={cx(css`
Expand Down

0 comments on commit 6ab4257

Please sign in to comment.