Skip to content

Commit

Permalink
fix(cdk/a11y): FocusTrap deprecation docs don't render correctly (#22137
Browse files Browse the repository at this point in the history
)

- fix invalid usage of `@breaking-change`
- update breaking change dgeni template to add 'or later'
- fix a couple of API doc typos

Relates to #18201. Relates to #22136.
  • Loading branch information
Splaktar committed Mar 19, 2021
1 parent 16b7adb commit c0286ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/cdk/a11y/focus-trap/focus-trap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ 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 misalign.
* Things like `tabIndex > 0`, flex `order`, and shadow roots can cause the two to be misaligned.
*
* @deprecated Use `ConfigurableFocusTrap` instead.
* @breaking-change for 11.0.0 Remove this class.
* @breaking-change 11.0.0
*/
export class FocusTrap {
private _startAnchor: HTMLElement | null;
Expand Down Expand Up @@ -96,7 +96,7 @@ export class FocusTrap {
/**
* Inserts the anchors into the DOM. This is usually done automatically
* in the constructor, but can be deferred for cases like directives with `*ngIf`.
* @returns Whether the focus trap managed to attach successfuly. This may not be the case
* @returns Whether the focus trap managed to attach successfully. This may not be the case
* if the target element isn't currently in the DOM.
*/
attachAnchors(): boolean {
Expand Down Expand Up @@ -355,7 +355,7 @@ export class FocusTrap {
/**
* Factory that allows easy instantiation of focus traps.
* @deprecated Use `ConfigurableFocusTrapFactory` instead.
* @breaking-change for 11.0.0 Remove this class.
* @breaking-change 11.0.0
*/
@Injectable({providedIn: 'root'})
export class FocusTrapFactory {
Expand Down
2 changes: 1 addition & 1 deletion tools/dgeni/templates/macros.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% macro deprecationTitle(doc) %}
{%- if doc.breakingChange -%}
title="Will be deleted in v{$ doc.breakingChange $}"
title="Will be removed in v{$ doc.breakingChange $} or later"
{%- endif -%}
{% endmacro %}

0 comments on commit c0286ea

Please sign in to comment.