Skip to content

Commit

Permalink
Add aria-expanded back to AnchoredOverlay (#4456)
Browse files Browse the repository at this point in the history
* Adds `aria-expanded="false"` back to `AnchoredOverlay`

* Add changeset
  • Loading branch information
TylerJDev authored Jun 6, 2024
1 parent 6cbbc49 commit 65f2cd1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit 65f2cd1

Please sign in to comment.