{"record":{"id":"e3b575c2377b8d3a","repo":"angular/components","slug":"found-use-of-deprecated-attribute-cdk-focus-regio","errorCode":null,"errorMessage":"Found use of deprecated attribute 'cdk-focus-region-${bound}', use 'cdkFocusRegion${bound}' instead. The deprecated attribute will be removed in 8.0.0.","messagePattern":"Found use of deprecated attribute 'cdk-focus-region-(.+?)', 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":196,"sourceCode":"   */\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);\n    }\n    return markers.length\n      ? markers[markers.length - 1]\n      : this._getLastTabbableElement(this._element);\n  }\n\n  /**","sourceCodeStart":178,"sourceCodeEnd":214,"githubUrl":"https://github.com/angular/components/blob/0411926e7d8ae06b32236ec1048a888cfad5abf2/src/cdk/a11y/focus-trap/focus-trap.ts#L178-L214","documentation":"Same deprecation family as the cdk-focus-* warning: this variant fires for the intermediate legacy attribute cdk-focus-region-start/cdk-focus-region-end, which should be renamed to the camelCase cdkFocusRegionStart/End before removal in 8.0.0.","triggerScenarios":"During focus trap initialization (redirectToElement → _getRegionBoundary), a marker element inside the trap has attribute cdk-focus-region-start or cdk-focus-region-end in dev mode.","commonSituations":"Apps that migrated from cdk-focus-start to cdk-focus-region-start during an earlier upgrade but not yet to cdkFocusRegionStart; older documentation or templates.","solutions":["Rename cdk-focus-region-start to cdkFocusRegionStart (and End equivalent) in templates","Grep for 'cdk-focus-region-' and fix all usages","Complete migration before v8 removal"],"exampleFix":"// before\n<div cdk-focus-region-end></div>\n// after\n<div cdkFocusRegionEnd></div>","handlingStrategy":"validation","validationCode":"if (document.querySelector('[cdk-focus-region-start], [cdk-focus-region-end]')) {\n  console.warn('Deprecated cdk-focus-region-* found; use cdkFocusRegionStart/End');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Standardize on cdkFocusRegionStart/End markers","Add a custom ESLint/template rule banning cdk-focus-region-*","Run dev-mode builds and heed deprecation warnings before major upgrades"],"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"}