File tree Expand file tree Collapse file tree 7 files changed +9
-5
lines changed Expand file tree Collapse file tree 7 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 11---
2- " @primer/react " : patch
2+ ' @primer/react ' : patch
33---
44
5- AnchoredOverlay accessibility fixes
6- - ` aria-expanded ` attribute is removed from anchor when overlay is not open
7- - ` tabIndex=0 ` is removed from anchor because it should only be used with interactive elements
8-
5+ AnchoredOverlay: ` aria-expanded ` attribute is removed from anchor when overlay is not open
Original file line number Diff line number Diff line change @@ -166,6 +166,7 @@ export const AnchoredOverlay: React.FC<AnchoredOverlayProps> = ({
166166 id : anchorId ,
167167 'aria-haspopup' : 'true' ,
168168 'aria-expanded' : open ? 'true' : undefined ,
169+ tabIndex : 0 ,
169170 onClick : onAnchorClick ,
170171 onKeyDown : onAnchorKeyDown
171172 } ) }
Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ exports[`ActionMenu renders consistently 1`] = `
130130 id = " react-aria-1"
131131 onClick = { [Function ]}
132132 onKeyDown = { [Function ]}
133+ tabIndex = { 0 }
133134 type = " button"
134135 >
135136 <span
Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ exports[`AnchoredOverlay renders consistently 1`] = `
8585 id = " react-aria-1"
8686 onClick = { [Function ]}
8787 onKeyDown = { [Function ]}
88+ tabIndex = { 0 }
8889 >
8990 Anchor Button
9091 </button >
@@ -201,6 +202,7 @@ exports[`AnchoredOverlay should render consistently when open 1`] = `
201202 aria-haspopup = " true"
202203 class = " c1"
203204 id = " react-aria-1"
205+ tabindex = " 0"
204206 >
205207 Anchor Button
206208 </button >
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ exports[`SelectPanel renders consistently 1`] = `
8989 id = " react-aria-1"
9090 onClick = { [Function ]}
9191 onKeyDown = { [Function ]}
92+ tabIndex = { 0 }
9293 type = " button"
9394 >
9495 Select Items
Original file line number Diff line number Diff line change @@ -74,5 +74,6 @@ exports[`ActionMenu renders consistently 1`] = `
7474 id = " react-aria-1"
7575 onClick = { [Function ]}
7676 onKeyDown = { [Function ]}
77+ tabIndex = { 0 }
7778/>
7879` ;
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ exports[`DropdownMenu renders consistently 1`] = `
7777 id = " react-aria-1"
7878 onClick = { [Function ]}
7979 onKeyDown = { [Function ]}
80+ tabIndex = { 0 }
8081 type = " button"
8182>
8283 <svg
You can’t perform that action at this time.
0 commit comments