diff --git a/packages/eslint-plugin-template/package.json b/packages/eslint-plugin-template/package.json index 9c6575a4fb..1290065623 100644 --- a/packages/eslint-plugin-template/package.json +++ b/packages/eslint-plugin-template/package.json @@ -20,12 +20,12 @@ "@angular-eslint/bundled-angular-compiler": "14.1.2", "@typescript-eslint/type-utils": "5.38.1", "@typescript-eslint/utils": "5.38.1", - "aria-query": "5.0.2", + "aria-query": "5.1.3", "axobject-query": "3.1.1" }, "devDependencies": { "@angular-eslint/utils": "14.1.2", - "@types/aria-query": "5.0.0" + "@types/aria-query": "5.0.1" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0", diff --git a/packages/eslint-plugin-template/src/rules/accessibility-role-has-required-aria.ts b/packages/eslint-plugin-template/src/rules/accessibility-role-has-required-aria.ts index d599427937..d8969b5807 100644 --- a/packages/eslint-plugin-template/src/rules/accessibility-role-has-required-aria.ts +++ b/packages/eslint-plugin-template/src/rules/accessibility-role-has-required-aria.ts @@ -2,7 +2,7 @@ import type { TmplAstTextAttribute, TmplAstElement, } from '@angular-eslint/bundled-angular-compiler'; -import type { ARIARoleDefintionKey } from 'aria-query'; +import type { ARIARoleDefinitionKey } from 'aria-query'; import { roles } from 'aria-query'; import { createESLintRule, @@ -48,7 +48,7 @@ export default createESLintRule({ const { attributes, inputs, name: element } = node.parent; const props = [...attributes, ...inputs]; - const roleDef = roles.get(role as ARIARoleDefintionKey); + const roleDef = roles.get(role as ARIARoleDefinitionKey); const requiredProps = Object.keys(roleDef?.requiredProps || {}); if (!requiredProps.length) return; diff --git a/packages/eslint-plugin-template/src/utils/is-interactive-element/get-interactive-element-role-schemas.ts b/packages/eslint-plugin-template/src/utils/is-interactive-element/get-interactive-element-role-schemas.ts index 7f66a25992..a101a4ca93 100644 --- a/packages/eslint-plugin-template/src/utils/is-interactive-element/get-interactive-element-role-schemas.ts +++ b/packages/eslint-plugin-template/src/utils/is-interactive-element/get-interactive-element-role-schemas.ts @@ -1,4 +1,7 @@ -import type { ARIARoleDefintionKey, ARIARoleRelationConcept } from 'aria-query'; +import type { + ARIARoleDefinitionKey, + ARIARoleRelationConcept, +} from 'aria-query'; import { elementRoles, roles } from 'aria-query'; let interactiveElementRoleSchemas: ARIARoleRelationConcept[] | null = null; @@ -14,9 +17,9 @@ export function getInteractiveElementRoleSchemas(): ARIARoleRelationConcept[] { // This set will contain all possible values for the `role` attribute, // e.g. `button`, `navigation` or `presentation`. - const interactiveRoles = new Set( + const interactiveRoles = new Set( roleKeys - .filter((name: ARIARoleDefintionKey) => { + .filter((name: ARIARoleDefinitionKey) => { const role = roles.get(name); return ( role && diff --git a/packages/eslint-plugin-template/src/utils/is-interactive-element/get-non-interactive-element-role-schemas.ts b/packages/eslint-plugin-template/src/utils/is-interactive-element/get-non-interactive-element-role-schemas.ts index 29634e2b3a..d6f12e03ea 100644 --- a/packages/eslint-plugin-template/src/utils/is-interactive-element/get-non-interactive-element-role-schemas.ts +++ b/packages/eslint-plugin-template/src/utils/is-interactive-element/get-non-interactive-element-role-schemas.ts @@ -1,8 +1,11 @@ -import type { ARIARoleDefintionKey, ARIARoleRelationConcept } from 'aria-query'; +import type { + ARIARoleDefinitionKey, + ARIARoleRelationConcept, +} from 'aria-query'; import { elementRoles, roles } from 'aria-query'; let nonInteractiveElementRoleSchemas: ARIARoleRelationConcept[] | null = null; -let nonInteractiveRoles: Set | null = null; +let nonInteractiveRoles: Set | null = null; // These functions follow the lazy initialization pattern. // Since this is a top-level module (it will be included via `require`), @@ -27,10 +30,10 @@ export function getNonInteractiveElementRoleSchemas(): ARIARoleRelationConcept[] return nonInteractiveElementRoleSchemas; } -export function getNonInteractiveRoles(): Set { +export function getNonInteractiveRoles(): Set { if (nonInteractiveRoles === null) { const roleKeys = [...roles.keys()]; - nonInteractiveRoles = new Set( + nonInteractiveRoles = new Set( roleKeys .filter((name) => { const role = roles.get(name); diff --git a/yarn.lock b/yarn.lock index 5d8095b099..744fa45ab6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3542,10 +3542,10 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== -"@types/aria-query@5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-5.0.0.tgz#df2d64b5cc73cca0d75e2a7793d6b5c199c2f7b2" - integrity sha512-P+dkdFu0n08PDIvw+9nT9ByQnd+Udc8DaWPb9HKfaPwCvWvQpC5XaMRx2xLWECm9x1VKNps6vEAlirjA6+uNrQ== +"@types/aria-query@5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-5.0.1.tgz#3286741fb8f1e1580ac28784add4c7a1d49bdfbc" + integrity sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q== "@types/babel__core@^7.1.14": version "7.1.14" @@ -4252,10 +4252,12 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -aria-query@5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.0.2.tgz#0b8a744295271861e1d933f8feca13f9b70cfdc1" - integrity sha512-eigU3vhqSO+Z8BKDnVLN/ompjhf3pYzecKXz8+whRy+9gZu8n1TCGfwzQUUPnqdHl9ax1Hr9031orZ+UOEYr7Q== +aria-query@5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.1.3.tgz#19db27cd101152773631396f7a95a3b58c22c35e" + integrity sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ== + dependencies: + deep-equal "^2.0.5" array-differ@^3.0.0: version "3.0.0"