Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add aria-expanded back to AnchoredOverlay #4456

Merged
merged 10 commits into from
Jun 6, 2024
5 changes: 5 additions & 0 deletions .changeset/chatty-phones-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': patch
---

Adds full `aria-expanded` (true/false) state to `AnchoredOverlay`, and components that consume it
2 changes: 1 addition & 1 deletion packages/react/src/AnchoredOverlay/AnchoredOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export const AnchoredOverlay: React.FC<React.PropsWithChildren<AnchoredOverlayPr
ref: anchorRef,
id: anchorId,
'aria-haspopup': 'true',
'aria-expanded': open ? 'true' : undefined,
'aria-expanded': open,
tabIndex: 0,
onClick: onAnchorClick,
onKeyDown: onAnchorKeyDown,
Expand Down
Loading