{"record":{"id":"8ec20091d8f597a6","repo":"angular/components","slug":"found-use-of-deprecated-attribute-cdk-focus-bou","errorCode":null,"errorMessage":"Found use of deprecated attribute 'cdk-focus-${bound}', use 'cdkFocusRegion${bound}' instead. The deprecated attribute will be removed in 8.0.0.","messagePattern":"Found use of deprecated attribute 'cdk-focus-(.+?)', use 'cdkFocusRegion(.+?)' instead\\. The deprecated attribute will be removed in 8\\.0\\.0\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/cdk/a11y/focus-trap/focus-trap.ts","lineNumber":189,"sourceCode":"    });\n  }\n\n  /**\n   * Get the specified boundary element of the trapped region.\n   * @param bound The boundary to get (start or end of trapped region).\n   * @returns The boundary element.\n   */\n  private _getRegionBoundary(bound: 'start' | 'end'): HTMLElement | null {\n    // Contains the deprecated version of selector, for temporary backwards comparability.\n    const markers = this._element.querySelectorAll(\n      `[cdk-focus-region-${bound}], [cdkFocusRegion${bound}], [cdk-focus-${bound}]`,\n    ) as NodeListOf<HTMLElement>;\n\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      for (let i = 0; i < markers.length; i++) {\n        // @breaking-change 8.0.0\n        if (markers[i].hasAttribute(`cdk-focus-${bound}`)) {\n          console.warn(\n            `Found use of deprecated attribute 'cdk-focus-${bound}', ` +\n              `use 'cdkFocusRegion${bound}' instead. The deprecated ` +\n              `attribute will be removed in 8.0.0.`,\n            markers[i],\n          );\n        } else if (markers[i].hasAttribute(`cdk-focus-region-${bound}`)) {\n          console.warn(\n            `Found use of deprecated attribute 'cdk-focus-region-${bound}', ` +\n              `use 'cdkFocusRegion${bound}' instead. The deprecated attribute ` +\n              `will be removed in 8.0.0.`,\n            markers[i],\n          );\n        }\n      }\n    }\n\n    if (bound == 'start') {\n      return markers.length ? markers[0] : this._getFirstTabbableElement(this._element);","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/angular/components/blob/0411926e7d8ae06b32236ec1048a888cfad5abf2/src/cdk/a11y/focus-trap/focus-trap.ts#L171-L207","documentation":"FocusTrap supports region boundary markers via the modern attributes cdkFocusRegionStart/End (and cdkFocusInitial). Older kebab-case attributes cdk-focus-start/cdk-focus-end are deprecated and this dev-mode warning fires when one is found, telling you to migrate before the 8.0.0 removal.","triggerScenarios":"During focus trap initialization (redirectToElement → _getRegionBoundary), an element inside the trapped region has the attribute cdk-focus-start or cdk-focus-end while ngDevMode is enabled.","commonSituations":"Apps upgraded from very old CDK versions still using the pre-rename attribute names in templates; copy-pasted old focus-trap examples.","solutions":["Rename the attribute in the template from cdk-focus-start to cdkFocusRegionStart (or cdk-focus-end to cdkFocusRegionEnd)","Search the codebase for 'cdk-focus-' to catch all occurrences","Upgrade fully before Angular 8.0.0 when the deprecated attributes stop being recognized"],"exampleFix":"// before\n<div cdk-focus-start></div>\n// after\n<div cdkFocusRegionStart></div>","handlingStrategy":"validation","validationCode":"// template lint check\nif (document.querySelector('[cdk-focus-start], [cdk-focus-end]')) {\n  console.warn('Deprecated cdk-focus-* attributes found; use cdkFocusRegionStart/End');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Grep templates for 'cdk-focus-' before CDK upgrades","Use camelCase cdkFocusRegion* attributes in all new templates","Track the 8.0.0 breaking-change removal in your upgrade checklist"],"tags":["deprecation","focus-trap","a11y","angular-cdk"],"backgroundTag":"deprecated-attribute","analyzedSha":"0411926e7d8ae06b32236ec1048a888cfad5abf2","analyzedAt":"2026-08-31T11:58:23.400Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}