@@ -146,12 +146,15 @@ export class FocusTrap {
146146 `[cdk-focus-${ bound } ]` ) as NodeListOf < HTMLElement > ;
147147
148148 for ( let i = 0 ; i < markers . length ; i ++ ) {
149+ // @deletion -target 7.0.0
149150 if ( markers [ i ] . hasAttribute ( `cdk-focus-${ bound } ` ) ) {
150- console . warn ( `Found use of deprecated attribute 'cdk-focus-${ bound } ',` +
151- ` use 'cdkFocusRegion${ bound } ' instead.` , markers [ i ] ) ;
151+ console . warn ( `Found use of deprecated attribute 'cdk-focus-${ bound } ', ` +
152+ `use 'cdkFocusRegion${ bound } ' instead. The deprecated ` +
153+ `attribute will be removed in 7.0.0.` , markers [ i ] ) ;
152154 } else if ( markers [ i ] . hasAttribute ( `cdk-focus-region-${ bound } ` ) ) {
153- console . warn ( `Found use of deprecated attribute 'cdk-focus-region-${ bound } ',` +
154- ` use 'cdkFocusRegion${ bound } ' instead.` , markers [ i ] ) ;
155+ console . warn ( `Found use of deprecated attribute 'cdk-focus-region-${ bound } ', ` +
156+ `use 'cdkFocusRegion${ bound } ' instead. The deprecated attribute ` +
157+ `will be removed in 7.0.0.` , markers [ i ] ) ;
155158 }
156159 }
157160
@@ -171,12 +174,14 @@ export class FocusTrap {
171174 const redirectToElement = this . _element . querySelector ( `[cdk-focus-initial], ` +
172175 `[cdkFocusInitial]` ) as HTMLElement ;
173176
174- if ( this . _element . hasAttribute ( `cdk-focus-initial` ) ) {
175- console . warn ( `Found use of deprecated attribute 'cdk-focus-initial',` +
176- ` use 'cdkFocusInitial' instead.` , this . _element ) ;
177- }
178-
179177 if ( redirectToElement ) {
178+ // @deletion -target 7.0.0
179+ if ( redirectToElement . hasAttribute ( `cdk-focus-initial` ) ) {
180+ console . warn ( `Found use of deprecated attribute 'cdk-focus-initial', ` +
181+ `use 'cdkFocusInitial' instead. The deprecated attribute ` +
182+ `will be removed in 7.0.0` , redirectToElement ) ;
183+ }
184+
180185 redirectToElement . focus ( ) ;
181186 return true ;
182187 }
0 commit comments