Skip to content

Commit 65f2cd1

Browse files
authored
Add aria-expanded back to AnchoredOverlay (#4456)
* Adds `aria-expanded="false"` back to `AnchoredOverlay` * Add changeset
1 parent 6cbbc49 commit 65f2cd1

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/chatty-phones-admire.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/react': patch
3+
---
4+
5+
Adds full `aria-expanded` (true/false) state to `AnchoredOverlay`, and components that consume it

packages/react/src/AnchoredOverlay/AnchoredOverlay.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export const AnchoredOverlay: React.FC<React.PropsWithChildren<AnchoredOverlayPr
172172
ref: anchorRef,
173173
id: anchorId,
174174
'aria-haspopup': 'true',
175-
'aria-expanded': open ? 'true' : undefined,
175+
'aria-expanded': open,
176176
tabIndex: 0,
177177
onClick: onAnchorClick,
178178
onKeyDown: onAnchorKeyDown,

0 commit comments

Comments
 (0)