Skip to content

refactor(cdk/a11y): un-deprecate focus trap #28768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/cdk/a11y/focus-trap/focus-trap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ import {InteractivityChecker} from '../interactivity-checker/interactivity-check
* This class currently uses a relatively simple approach to focus trapping.
* It assumes that the tab order is the same as DOM order, which is not necessarily true.
* Things like `tabIndex > 0`, flex `order`, and shadow roots can cause the two to be misaligned.
*
* @deprecated Use `ConfigurableFocusTrap` instead.
* @breaking-change 11.0.0
*/
export class FocusTrap {
private _startAnchor: HTMLElement | null;
Expand Down Expand Up @@ -368,8 +365,6 @@ export class FocusTrap {

/**
* Factory that allows easy instantiation of focus traps.
* @deprecated Use `ConfigurableFocusTrapFactory` instead.
* @breaking-change 11.0.0
*/
@Injectable({providedIn: 'root'})
export class FocusTrapFactory {
Expand Down
4 changes: 2 additions & 2 deletions tools/public_api_guard/cdk/a11y.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export { FocusOptions_2 as FocusOptions }
// @public (undocumented)
export type FocusOrigin = 'touch' | 'mouse' | 'keyboard' | 'program' | null;

// @public @deprecated
// @public
export class FocusTrap {
constructor(_element: HTMLElement, _checker: InteractivityChecker, _ngZone: NgZone, _document: Document, deferAnchors?: boolean);
attachAnchors(): boolean;
Expand Down Expand Up @@ -246,7 +246,7 @@ export class FocusTrap {
protected toggleAnchors(enabled: boolean): void;
}

// @public @deprecated
// @public
export class FocusTrapFactory {
constructor(_checker: InteractivityChecker, _ngZone: NgZone, _document: any);
create(element: HTMLElement, deferCaptureElements?: boolean): FocusTrap;
Expand Down