Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/HeaderActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export default function HeaderActions(): React.JSX.Element {
type="button"
aria-expanded={isOpen ? 'true' : 'false'}
aria-controls={menuId}
aria-label={isOpen ? 'Close wallet actions' : 'Open wallet actions'}
onClick={handleToggle}
className="inline-flex h-10 w-10 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-700 shadow-sm transition hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-white sm:hidden"
>
Expand Down
2 changes: 2 additions & 0 deletions src/components/__tests__/HeaderActions.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ describe('HeaderActions — initial render', () => {
const toggle = getToggle();
expect(toggle).toBeInTheDocument();
expect(toggle).toHaveAttribute('aria-expanded', 'false');
expect(toggle).toHaveAttribute('aria-label', 'Open wallet actions');
});

it('renders the controlled wallet-actions panel', () => {
Expand Down Expand Up @@ -142,6 +143,7 @@ describe('HeaderActions — ARIA attribute wiring', () => {
// After opening, find toggle by updated label
const toggle = screen.getByRole('button', { name: /close wallet actions/i });
expect(toggle).toHaveAttribute('aria-expanded', 'true');
expect(toggle).toHaveAttribute('aria-label', 'Close wallet actions');
});

it('aria-expanded returns to "false" after the second click', () => {
Expand Down
Loading