Skip to content

Commit

Permalink
Adds aria-expanded="false" back to AnchoredOverlay (#4394)
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 Mar 19, 2024
1 parent d4edf2a commit cc9b98a
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 cc9b98a

Please sign in to comment.