Skip to content

Commit b34dedf

Browse files
committed
feat: add support for keyboard based reordering + misc fixes
1 parent 8b4cf11 commit b34dedf

11 files changed

Lines changed: 345 additions & 234 deletions

File tree

apps/web/src/components/HiddenDaoDisclosure.css.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export const hiddenDaoDisclosureTrigger = style({
1818
color: 'inherit',
1919
textAlign: 'left',
2020
transition: 'background-color 0.12s ease',
21+
cursor: 'pointer',
2122
selectors: {
2223
'&:hover': {
2324
backgroundColor: color.background2,

apps/web/src/components/HiddenDaoDisclosure.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ export const HiddenDaoDisclosure: React.FC<HiddenDaoDisclosureProps> = ({
2323
isOpen,
2424
onToggle,
2525
}) => {
26+
const panelId = React.useId()
27+
2628
return (
2729
<Box className={hiddenDaoDisclosure}>
2830
<Box
@@ -31,6 +33,7 @@ export const HiddenDaoDisclosure: React.FC<HiddenDaoDisclosureProps> = ({
3133
className={hiddenDaoDisclosureTrigger}
3234
onClick={onToggle}
3335
aria-expanded={isOpen}
36+
aria-controls={panelId}
3437
>
3538
<Flex
3639
align="center"
@@ -44,7 +47,11 @@ export const HiddenDaoDisclosure: React.FC<HiddenDaoDisclosureProps> = ({
4447
</Flex>
4548
<Text fontWeight="display">{`Hidden DAOs (${count})`}</Text>
4649
</Box>
47-
{isOpen ? <Box className={hiddenDaoDisclosureContent}>{children}</Box> : null}
50+
{isOpen ? (
51+
<Box id={panelId} className={hiddenDaoDisclosureContent}>
52+
{children}
53+
</Box>
54+
) : null}
4855
</Box>
4956
)
5057
}

0 commit comments

Comments
 (0)