Skip to content

Commit fe9f84f

Browse files
committed
refactor(cdk/a11y): un-deprecate focus trap
The `FocusTrap` and `FocusTrapFactory` symbols were marked as deprecated a while ago, but the only way to provide the `ConfigurableFocusTrap` is to reference the deprecated symbols. These changes un-deprecate the former to avoid confusion.
1 parent e45946d commit fe9f84f

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/cdk/a11y/focus-trap/focus-trap.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ import {InteractivityChecker} from '../interactivity-checker/interactivity-check
3232
* This class currently uses a relatively simple approach to focus trapping.
3333
* It assumes that the tab order is the same as DOM order, which is not necessarily true.
3434
* Things like `tabIndex > 0`, flex `order`, and shadow roots can cause the two to be misaligned.
35-
*
36-
* @deprecated Use `ConfigurableFocusTrap` instead.
37-
* @breaking-change 11.0.0
3835
*/
3936
export class FocusTrap {
4037
private _startAnchor: HTMLElement | null;
@@ -368,8 +365,6 @@ export class FocusTrap {
368365

369366
/**
370367
* Factory that allows easy instantiation of focus traps.
371-
* @deprecated Use `ConfigurableFocusTrapFactory` instead.
372-
* @breaking-change 11.0.0
373368
*/
374369
@Injectable({providedIn: 'root'})
375370
export class FocusTrapFactory {

tools/public_api_guard/cdk/a11y.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ export { FocusOptions_2 as FocusOptions }
215215
// @public (undocumented)
216216
export type FocusOrigin = 'touch' | 'mouse' | 'keyboard' | 'program' | null;
217217

218-
// @public @deprecated
218+
// @public
219219
export class FocusTrap {
220220
constructor(_element: HTMLElement, _checker: InteractivityChecker, _ngZone: NgZone, _document: Document, deferAnchors?: boolean);
221221
attachAnchors(): boolean;
@@ -244,7 +244,7 @@ export class FocusTrap {
244244
protected toggleAnchors(enabled: boolean): void;
245245
}
246246

247-
// @public @deprecated
247+
// @public
248248
export class FocusTrapFactory {
249249
constructor(_checker: InteractivityChecker, _ngZone: NgZone, _document: any);
250250
create(element: HTMLElement, deferCaptureElements?: boolean): FocusTrap;

0 commit comments

Comments
 (0)