Skip to content

Commit 62e39ee

Browse files
committed
fix: Avoid using aria-hidden on a focused element
1 parent 5e23b31 commit 62e39ee

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/Dialog/Content/Panel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ const Panel = React.forwardRef<ContentRef, PanelProps>((props, ref) => {
121121
onMouseDown={onMouseDown}
122122
onMouseUp={onMouseUp}
123123
>
124-
<div tabIndex={0} ref={sentinelStartRef} style={sentinelStyle} aria-hidden="true" />
124+
<div tabIndex={0} ref={sentinelStartRef} style={sentinelStyle} />
125125
<MemoChildren shouldUpdate={visible || forceRender}>
126126
{modalRender ? modalRender(content) : content}
127127
</MemoChildren>
128-
<div tabIndex={0} ref={sentinelEndRef} style={sentinelStyle} aria-hidden="true" />
128+
<div tabIndex={0} ref={sentinelEndRef} style={sentinelStyle} />
129129
</div>
130130
);
131131
});

tests/__snapshots__/index.spec.tsx.snap

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ exports[`dialog add rootClassName should render correct 1`] = `
1919
style="width: 600px; height: 903px;"
2020
>
2121
<div
22-
aria-hidden="true"
2322
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
2423
tabindex="0"
2524
/>
@@ -40,7 +39,6 @@ exports[`dialog add rootClassName should render correct 1`] = `
4039
/>
4140
</div>
4241
<div
43-
aria-hidden="true"
4442
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
4543
tabindex="0"
4644
/>
@@ -67,7 +65,6 @@ exports[`dialog should render correct 1`] = `
6765
role="dialog"
6866
>
6967
<div
70-
aria-hidden="true"
7168
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
7269
tabindex="0"
7370
/>
@@ -98,7 +95,6 @@ exports[`dialog should render correct 1`] = `
9895
/>
9996
</div>
10097
<div
101-
aria-hidden="true"
10298
style="width: 0px; height: 0px; overflow: hidden; outline: none;"
10399
tabindex="0"
104100
/>

0 commit comments

Comments
 (0)