Skip to content

Commit c7e4181

Browse files
committed
fix(offcanvas): use inert attribute instead of aria-hidden
1 parent db6d0e4 commit c7e4181

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/coreui-angular/src/lib/offcanvas/offcanvas/offcanvas.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ let nextId = 0;
5252
exportAs: 'cOffcanvas',
5353
imports: [A11yModule],
5454
hostDirectives: [{ directive: ThemeDirective, inputs: ['dark'] }],
55-
host: { ngSkipHydration: 'true' }
55+
host: { ngSkipHydration: 'true', '[attr.inert]': 'ariaHidden || null' }
5656
})
5757
export class OffcanvasComponent implements OnInit, OnDestroy {
5858
readonly #document = inject<Document>(DOCUMENT);
@@ -158,7 +158,7 @@ export class OffcanvasComponent implements OnInit, OnDestroy {
158158
};
159159
}
160160

161-
@HostBinding('attr.aria-hidden')
161+
// @HostBinding('attr.aria-hidden')
162162
get ariaHidden(): boolean | null {
163163
return this.visible ? null : true;
164164
}

0 commit comments

Comments
 (0)