Skip to content

Commit

Permalink
docs: accessible toggle button in examples (nextui-org#1749)
Browse files Browse the repository at this point in the history
  • Loading branch information
jguddas authored Oct 7, 2023
1 parent 5af4b10 commit 9245384
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/docs/content/components/select/open-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function App() {
</SelectItem>
))}
</Select>
<Button onPress={() => setIsOpen(!isOpen)}>
<Button aria-label="Open" aria-pressed={isOpen} onPress={() => setIsOpen(!isOpen)}>
{isOpen ? "Close" : "Open"}
</Button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/components/button/stories/button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const StateTemplate = (args: ButtonProps) => {
};

return (
<Button {...args} onPress={handleClick}>
<Button {...args} aria-label="Open" aria-pressed={isOpen} onPress={handleClick}>
{isOpen ? "Close" : "Open"}
</Button>
);
Expand Down

0 comments on commit 9245384

Please sign in to comment.