Skip to content

Commit

Permalink
fix: workaround LiveRegion layout issues (#1534)
Browse files Browse the repository at this point in the history
  • Loading branch information
duvallj authored Nov 23, 2024
1 parent e2a1776 commit 93602df
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .changeset/tidy-cobras-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@dnd-kit/accessibility': patch
---

Workaround `<LiveRegion>` layout bug by adding explicit `top` and `left`
attributes. Under sufficiently complex CSS conditions, the element would
overflow containers that it's not supposed to. See [this
post](https://blog.duvallj.pw/posts/2024-11-19-chrome-heisenbug-uncovered.html)
for a complete explanation.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export function LiveRegion({id, announcement, ariaLiveType = "assertive"}: Props
// Hide element visually but keep it readable by screen readers
const visuallyHidden: React.CSSProperties = {
position: 'fixed',
top: 0,
left: 0,
width: 1,
height: 1,
margin: -1,
Expand Down

0 comments on commit 93602df

Please sign in to comment.