Skip to content

Commit

Permalink
Merge pull request #163 from element-hq/florianduros/ra-accessibility
Browse files Browse the repository at this point in the history
Release Announcement: fix accessibility issue on the anchor
  • Loading branch information
florianduros authored May 2, 2024
2 parents 68ec8de + 7c805b8 commit 43089ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/ReleaseAnnouncement/ReleaseAnnouncement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ function ReleaseAnnouncementAnchor({
context.getReferenceProps({
ref,
...children.props,
"data-state": context.open ? "open" : "closed",
// If the ReleaseAnnouncement is open, we need manually aria-describedby.
// The RA has the dialog role and it's not adding automatically the aria-describedby.
...(context.open && {
"aria-describedby": context.getFloatingProps().id,
}),
}),
);
}
Expand Down

0 comments on commit 43089ad

Please sign in to comment.