Skip to content

Commit

Permalink
Revert "Add hack for Chromium bug"
Browse files Browse the repository at this point in the history
  • Loading branch information
stokesman committed Feb 19, 2025
1 parent 5075de3 commit c7fbbc5
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions packages/components/src/modal/aria-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,4 @@ export function unmodalize() {
for ( const element of hiddenElements ) {
element.removeAttribute( 'inert' );
}

// Hacks around a Chromium bug where it may fail to restore a region to the
// accessibility tree after an ancestor had the `inert` attribute removed.
// The bug seems like a variation of this: https://crbug.com/1354313
// This workaround doesn't have to be a custom property. It also seems to
// not have to be done each invocation but it's inexpensive and ensures
// some other code didn't remove it.
document
.querySelectorAll< HTMLElement >( '[role=region]' )
.forEach( ( region ) => region.style.setProperty( '--∞', '8' ) );
}

0 comments on commit c7fbbc5

Please sign in to comment.