Skip to content

Commit

Permalink
First round of PR review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcramer committed Jan 17, 2025
1 parent 8d7d49f commit 87ed441
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/internal/primitives/Dialog.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ describe('Dialog', () => {
render(
<Dialog
isOpen={true}
ariaLabel="Test Dialog"
ariaDescribedby="dialog-desc"
ariaLabelledby="dialog-title"
aria-label="Test Dialog"
aria-describedby="dialog-desc"
aria-labelledby="dialog-title"
onClose={() => {}}
>
<div>Dialog content</div>
Expand Down
12 changes: 6 additions & 6 deletions src/internal/primitives/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ type DialogProps = {
isOpen?: boolean;
onClose?: () => void;
modal?: boolean;
ariaLabel?: string;
ariaLabelledby?: string;
ariaDescribedby?: string;
'aria-label'?: string;
'aria-labelledby'?: string;
'aria-describedby'?: string;
};

/**
Expand All @@ -28,9 +28,9 @@ export function Dialog({
isOpen,
modal = true,
onClose,
ariaLabel,
ariaLabelledby,
ariaDescribedby,
'aria-label': ariaLabel,
'aria-labelledby': ariaLabelledby,
'aria-describedby': ariaDescribedby,
}: DialogProps) {
const componentTheme = useTheme();
const dialogRef = useRef<HTMLDivElement>(null);
Expand Down
2 changes: 1 addition & 1 deletion src/internal/primitives/FocusTrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type React from 'react';
import { useEffect, useRef } from 'react';

const FOCUSABLE_ELEMENTS_SELECTOR =
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';

interface FocusTrapProps {
active?: boolean;
Expand Down
4 changes: 1 addition & 3 deletions src/wallet/components/ConnectWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ export function ConnectWallet({
}}
text={text}
/>
{isModalOpen && (
<WalletModal isOpen={true} onClose={handleCloseConnectModal} />
)}
<WalletModal isOpen={isModalOpen} onClose={handleCloseConnectModal} />
</div>
);
}
Expand Down
1 change: 1 addition & 0 deletions src/wallet/components/WalletModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export function WalletModal({
border.default,
'absolute top-4 right-4',
'flex items-center justify-center p-1',
'bg-current',
'transition-colors duration-200',
)}
aria-label="Close modal"
Expand Down

0 comments on commit 87ed441

Please sign in to comment.