@@ -150,12 +150,16 @@ export class FocusTrap {
150150
151151 // Contains the deprecated version of selector, for temporary backwards comparability.
152152 let markers = this . _element . querySelectorAll ( `[cdk-focus-region-${ bound } ], ` +
153+ `[cdkFocusRegion${ bound } ], ` +
153154 `[cdk-focus-${ bound } ]` ) as NodeListOf < HTMLElement > ;
154155
155156 for ( let i = 0 ; i < markers . length ; i ++ ) {
156157 if ( markers [ i ] . hasAttribute ( `cdk-focus-${ bound } ` ) ) {
157158 console . warn ( `Found use of deprecated attribute 'cdk-focus-${ bound } ',` +
158- ` use 'cdk-focus-region-${ bound } ' instead.` , markers [ i ] ) ;
159+ ` use 'cdkFocusRegion${ bound } ' instead.` , markers [ i ] ) ;
160+ } else if ( markers [ i ] . hasAttribute ( `cdk-focus-region-${ bound } ` ) ) {
161+ console . warn ( `Found use of deprecated attribute 'cdk-focus-region-${ bound } ',` +
162+ ` use 'cdkFocusRegion${ bound } ' instead.` , markers [ i ] ) ;
159163 }
160164 }
161165
@@ -175,7 +179,14 @@ export class FocusTrap {
175179 return false ;
176180 }
177181
178- const redirectToElement = this . _element . querySelector ( '[cdk-focus-initial]' ) as HTMLElement ;
182+ // Contains the deprecated version of selector, for temporary backwards comparability.
183+ const redirectToElement = this . _element . querySelector ( `[cdk-focus-initial], ` +
184+ `[cdkFocusInitial]` ) as HTMLElement ;
185+
186+ if ( this . _element . hasAttribute ( `cdk-focus-initial` ) ) {
187+ console . warn ( `Found use of deprecated attribute 'cdk-focus-initial',` +
188+ ` use 'cdkFocusInitial' instead.` , this . _element ) ;
189+ }
179190
180191 if ( redirectToElement ) {
181192 redirectToElement . focus ( ) ;
0 commit comments