@@ -150,12 +150,16 @@ export class FocusTrap {
150
150
151
151
// Contains the deprecated version of selector, for temporary backwards comparability.
152
152
let markers = this . _element . querySelectorAll ( `[cdk-focus-region-${ bound } ], ` +
153
+ `[cdkFocusRegion${ bound } ], ` +
153
154
`[cdk-focus-${ bound } ]` ) as NodeListOf < HTMLElement > ;
154
155
155
156
for ( let i = 0 ; i < markers . length ; i ++ ) {
156
157
if ( markers [ i ] . hasAttribute ( `cdk-focus-${ bound } ` ) ) {
157
158
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 ] ) ;
159
163
}
160
164
}
161
165
@@ -175,7 +179,14 @@ export class FocusTrap {
175
179
return false ;
176
180
}
177
181
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
+ }
179
190
180
191
if ( redirectToElement ) {
181
192
redirectToElement . focus ( ) ;
0 commit comments