@elastic/eslint-plugin-eui 2.3.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/README.md +18 -3
  2. package/lib/cjs/index.js +19 -18
  3. package/lib/cjs/rules/a11y/accessible_interactive_element.d.ts +3 -0
  4. package/lib/cjs/rules/a11y/accessible_interactive_element.d.ts.map +1 -0
  5. package/lib/cjs/rules/a11y/accessible_interactive_element.js +51 -0
  6. package/lib/cjs/rules/a11y/callout_announce_on_mount.d.ts +3 -0
  7. package/lib/cjs/rules/a11y/callout_announce_on_mount.d.ts.map +1 -0
  8. package/lib/cjs/rules/a11y/callout_announce_on_mount.js +56 -0
  9. package/lib/cjs/rules/a11y/consistent_is_invalid_props.d.ts.map +1 -1
  10. package/lib/cjs/rules/a11y/consistent_is_invalid_props.js +7 -18
  11. package/lib/cjs/rules/a11y/no_unnamed_interactive_element.d.ts +3 -0
  12. package/lib/cjs/rules/a11y/no_unnamed_interactive_element.d.ts.map +1 -0
  13. package/lib/cjs/rules/a11y/no_unnamed_interactive_element.js +78 -0
  14. package/lib/cjs/rules/a11y/no_unnamed_radio_group.d.ts.map +1 -1
  15. package/lib/cjs/rules/a11y/no_unnamed_radio_group.js +5 -16
  16. package/lib/cjs/rules/a11y/prefer_eui_icon_tip.d.ts.map +1 -1
  17. package/lib/cjs/rules/a11y/prefer_eui_icon_tip.js +8 -0
  18. package/lib/cjs/rules/a11y/require_aria_label_for_modals.d.ts.map +1 -1
  19. package/lib/cjs/rules/a11y/require_aria_label_for_modals.js +5 -16
  20. package/lib/cjs/rules/a11y/sr_output_disabled_tooltip.js +2 -2
  21. package/lib/cjs/rules/a11y/tooltip_focusable_anchor.d.ts +3 -0
  22. package/lib/cjs/rules/a11y/tooltip_focusable_anchor.d.ts.map +1 -0
  23. package/lib/cjs/rules/a11y/tooltip_focusable_anchor.js +68 -0
  24. package/lib/cjs/rules/href_or_on_click.d.ts.map +1 -1
  25. package/lib/cjs/rules/href_or_on_click.js +5 -16
  26. package/lib/cjs/rules/no_css_color.d.ts.map +1 -1
  27. package/lib/cjs/rules/no_css_color.js +14 -7
  28. package/lib/cjs/rules/no_restricted_eui_imports.d.ts.map +1 -1
  29. package/lib/cjs/rules/no_restricted_eui_imports.js +5 -16
  30. package/lib/cjs/utils/are_attrs_equal.d.ts.map +1 -1
  31. package/lib/cjs/utils/are_attrs_equal.js +5 -16
  32. package/lib/cjs/utils/constants.d.ts +27 -0
  33. package/lib/cjs/utils/constants.d.ts.map +1 -0
  34. package/lib/cjs/utils/constants.js +41 -0
  35. package/lib/cjs/utils/get_allowed_a11y_prop_names_for_component.d.ts +24 -0
  36. package/lib/cjs/utils/get_allowed_a11y_prop_names_for_component.d.ts.map +1 -0
  37. package/lib/cjs/utils/get_allowed_a11y_prop_names_for_component.js +39 -0
  38. package/lib/cjs/utils/get_attr_value.d.ts +2 -1
  39. package/lib/cjs/utils/get_attr_value.d.ts.map +1 -1
  40. package/lib/cjs/utils/get_attr_value.js +11 -18
  41. package/lib/cjs/utils/has_a11y_prop_for_component.d.ts +20 -0
  42. package/lib/cjs/utils/has_a11y_prop_for_component.d.ts.map +1 -0
  43. package/lib/cjs/utils/has_a11y_prop_for_component.js +36 -0
  44. package/lib/cjs/utils/has_spread.d.ts +12 -0
  45. package/lib/cjs/utils/has_spread.d.ts.map +1 -0
  46. package/lib/cjs/utils/has_spread.js +27 -0
  47. package/lib/cjs/utils/is_in_conditional_rendering.d.ts +3 -0
  48. package/lib/cjs/utils/is_in_conditional_rendering.d.ts.map +1 -0
  49. package/lib/cjs/utils/is_in_conditional_rendering.js +24 -0
  50. package/lib/cjs/utils/resolve_member_expression_root.d.ts.map +1 -1
  51. package/lib/cjs/utils/resolve_member_expression_root.js +8 -0
  52. package/lib/esm/index.js +17 -16
  53. package/lib/esm/index.js.map +1 -1
  54. package/lib/esm/rules/a11y/accessible_interactive_element.d.ts +2 -0
  55. package/lib/esm/rules/a11y/accessible_interactive_element.js +50 -0
  56. package/lib/esm/rules/a11y/accessible_interactive_element.js.map +1 -0
  57. package/lib/esm/rules/a11y/callout_announce_on_mount.d.ts +2 -0
  58. package/lib/esm/rules/a11y/callout_announce_on_mount.js +66 -0
  59. package/lib/esm/rules/a11y/callout_announce_on_mount.js.map +1 -0
  60. package/lib/esm/rules/a11y/consistent_is_invalid_props.js +7 -18
  61. package/lib/esm/rules/a11y/consistent_is_invalid_props.js.map +1 -1
  62. package/lib/esm/rules/a11y/no_unnamed_interactive_element.d.ts +2 -0
  63. package/lib/esm/rules/a11y/no_unnamed_interactive_element.js +94 -0
  64. package/lib/esm/rules/a11y/no_unnamed_interactive_element.js.map +1 -0
  65. package/lib/esm/rules/a11y/no_unnamed_radio_group.js +5 -16
  66. package/lib/esm/rules/a11y/no_unnamed_radio_group.js.map +1 -1
  67. package/lib/esm/rules/a11y/prefer_eui_icon_tip.js +7 -0
  68. package/lib/esm/rules/a11y/prefer_eui_icon_tip.js.map +1 -1
  69. package/lib/esm/rules/a11y/require_aria_label_for_modals.js +5 -16
  70. package/lib/esm/rules/a11y/require_aria_label_for_modals.js.map +1 -1
  71. package/lib/esm/rules/a11y/sr_output_disabled_tooltip.js +2 -2
  72. package/lib/esm/rules/a11y/sr_output_disabled_tooltip.js.map +1 -1
  73. package/lib/esm/rules/a11y/tooltip_focusable_anchor.d.ts +2 -0
  74. package/lib/esm/rules/a11y/tooltip_focusable_anchor.js +84 -0
  75. package/lib/esm/rules/a11y/tooltip_focusable_anchor.js.map +1 -0
  76. package/lib/esm/rules/href_or_on_click.js +5 -16
  77. package/lib/esm/rules/href_or_on_click.js.map +1 -1
  78. package/lib/esm/rules/no_css_color.js +22 -7
  79. package/lib/esm/rules/no_css_color.js.map +1 -1
  80. package/lib/esm/rules/no_restricted_eui_imports.js +5 -16
  81. package/lib/esm/rules/no_restricted_eui_imports.js.map +1 -1
  82. package/lib/esm/utils/are_attrs_equal.js +5 -16
  83. package/lib/esm/utils/are_attrs_equal.js.map +1 -1
  84. package/lib/esm/utils/constants.d.ts +26 -0
  85. package/lib/esm/utils/constants.js +119 -0
  86. package/lib/esm/utils/constants.js.map +1 -0
  87. package/lib/esm/utils/get_allowed_a11y_prop_names_for_component.d.ts +23 -0
  88. package/lib/esm/utils/get_allowed_a11y_prop_names_for_component.js +34 -0
  89. package/lib/esm/utils/get_allowed_a11y_prop_names_for_component.js.map +1 -0
  90. package/lib/esm/utils/get_attr_value.d.ts +2 -1
  91. package/lib/esm/utils/get_attr_value.js +11 -18
  92. package/lib/esm/utils/get_attr_value.js.map +1 -1
  93. package/lib/esm/utils/has_a11y_prop_for_component.d.ts +19 -0
  94. package/lib/esm/utils/has_a11y_prop_for_component.js +34 -0
  95. package/lib/esm/utils/has_a11y_prop_for_component.js.map +1 -0
  96. package/lib/esm/utils/has_spread.d.ts +11 -0
  97. package/lib/esm/utils/has_spread.js +23 -0
  98. package/lib/esm/utils/has_spread.js.map +1 -0
  99. package/lib/esm/utils/is_in_conditional_rendering.d.ts +2 -0
  100. package/lib/esm/utils/is_in_conditional_rendering.js +23 -0
  101. package/lib/esm/utils/is_in_conditional_rendering.js.map +1 -0
  102. package/lib/esm/utils/resolve_member_expression_root.js +7 -0
  103. package/lib/esm/utils/resolve_member_expression_root.js.map +1 -1
  104. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"no_restricted_eui_imports.d.ts","sourceRoot":"","sources":["../../../src/rules/no_restricted_eui_imports.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAY,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAE9D,KAAK,MAAM,GAAG;IACZ,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAUF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,CA4CjF,CAAC"}
1
+ {"version":3,"file":"no_restricted_eui_imports.d.ts","sourceRoot":"","sources":["../../../src/rules/no_restricted_eui_imports.ts"],"names":[],"mappings":"AASA,OAAO,EAAY,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAE9D,KAAK,MAAM,GAAG;IACZ,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAUF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,CA4CjF,CAAC"}
@@ -7,22 +7,11 @@ exports.NoRestrictedEuiImports = void 0;
7
7
  var _micromatch = _interopRequireDefault(require("micromatch"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
9
  /*
10
- * Licensed to Elasticsearch B.V. under one or more contributor
11
- * license agreements. See the NOTICE file distributed with
12
- * this work for additional information regarding copyright
13
- * ownership. Elasticsearch B.V. licenses this file to you under
14
- * the Apache License, Version 2.0 (the "License"); you may
15
- * not use this file except in compliance with the License.
16
- * You may obtain a copy of the License at
17
- *
18
- * http://www.apache.org/licenses/LICENSE-2.0
19
- *
20
- * Unless required by applicable law or agreed to in writing,
21
- * software distributed under the License is distributed on an
22
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23
- * KIND, either express or implied. See the License for the
24
- * specific language governing permissions and limitations
25
- * under the License.
10
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
11
+ * or more contributor license agreements. Licensed under the Elastic License
12
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
13
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
14
+ * Side Public License, v 1.
26
15
  */
27
16
 
28
17
  const DEFAULT_RESTRICTED_IMPORT_OPTIONS = [{
@@ -1 +1 @@
1
- {"version":3,"file":"are_attrs_equal.d.ts","sourceRoot":"","sources":["../../../src/utils/are_attrs_equal.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,aAAa,GAAI,GAAG,SAAS,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,KAAG,OAGrE,CAAC"}
1
+ {"version":3,"file":"are_attrs_equal.d.ts","sourceRoot":"","sources":["../../../src/utils/are_attrs_equal.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,aAAa,GAAI,GAAG,SAAS,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,KAAG,OAGrE,CAAC"}
@@ -5,22 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.areAttrsEqual = void 0;
7
7
  /*
8
- * Licensed to Elasticsearch B.V. under one or more contributor
9
- * license agreements. See the NOTICE file distributed with
10
- * this work for additional information regarding copyright
11
- * ownership. Elasticsearch B.V. licenses this file to you under
12
- * the Apache License, Version 2.0 (the "License"); you may
13
- * not use this file except in compliance with the License.
14
- * You may obtain a copy of the License at
15
- *
16
- * http://www.apache.org/licenses/LICENSE-2.0
17
- *
18
- * Unless required by applicable law or agreed to in writing,
19
- * software distributed under the License is distributed on an
20
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
- * KIND, either express or implied. See the License for the
22
- * specific language governing permissions and limitations
23
- * under the License.
8
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
9
+ * or more contributor license agreements. Licensed under the Elastic License
10
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
11
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
12
+ * Side Public License, v 1.
24
13
  */
25
14
 
26
15
  const normalizeAttrString = str => str?.trim().replace(/\s+/g, ' ');
@@ -0,0 +1,27 @@
1
+ /**
2
+ * A list of standard HTML tags that are considered **non-interactive** elements.
3
+ *
4
+ * These tags generally do not provide any built-in user interaction
5
+ * (such as click, input, or focus behavior) and are typically used for
6
+ * layout, structure, or content presentation rather than direct
7
+ * interactivity.
8
+ *
9
+ * This constant can be useful when:
10
+ * - Determining whether an element should be treated as interactive.
11
+ * - Enforcing accessibility rules (e.g., ensuring interactive behavior is only applied to proper elements).
12
+ * - Filtering DOM nodes when processing or analyzing HTML structures.
13
+ */
14
+ export declare const NON_INTERACTIVE_HTML_TAGS: string[];
15
+ /**
16
+ * A list of Elastic UI (EUI) React components that are considered **interactive**.
17
+ *
18
+ * These components are designed to be focusable and respond to user actions
19
+ * such as clicks, keyboard events, or other interactions. Use this constant
20
+ * when you need to determine if a given EUI component is inherently interactive,
21
+ * for example, when enforcing accessibility rules or filtering components
22
+ * for focus management.
23
+ *
24
+ * This list should be kept up to date with EUI's interactive component offerings.
25
+ */
26
+ export declare const INTERACTIVE_EUI_COMPONENTS: string[];
27
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,yBAAyB,UAyCrC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,0BAA0B,UAyCtC,CAAC"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.NON_INTERACTIVE_HTML_TAGS = exports.INTERACTIVE_EUI_COMPONENTS = void 0;
7
+ /*
8
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
9
+ * or more contributor license agreements. Licensed under the Elastic License
10
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
11
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
12
+ * Side Public License, v 1.
13
+ */
14
+
15
+ /**
16
+ * A list of standard HTML tags that are considered **non-interactive** elements.
17
+ *
18
+ * These tags generally do not provide any built-in user interaction
19
+ * (such as click, input, or focus behavior) and are typically used for
20
+ * layout, structure, or content presentation rather than direct
21
+ * interactivity.
22
+ *
23
+ * This constant can be useful when:
24
+ * - Determining whether an element should be treated as interactive.
25
+ * - Enforcing accessibility rules (e.g., ensuring interactive behavior is only applied to proper elements).
26
+ * - Filtering DOM nodes when processing or analyzing HTML structures.
27
+ */
28
+ const NON_INTERACTIVE_HTML_TAGS = exports.NON_INTERACTIVE_HTML_TAGS = ['div', 'span', 'p', 'article', 'aside', 'blockquote', 'br', 'caption', 'code', 'dd', 'dl', 'dt', 'figcaption', 'figure', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'img', 'li', 'main', 'nav', 'ol', 'pre', 'section', 'small', 'strong', 'sub', 'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'ul'];
29
+
30
+ /**
31
+ * A list of Elastic UI (EUI) React components that are considered **interactive**.
32
+ *
33
+ * These components are designed to be focusable and respond to user actions
34
+ * such as clicks, keyboard events, or other interactions. Use this constant
35
+ * when you need to determine if a given EUI component is inherently interactive,
36
+ * for example, when enforcing accessibility rules or filtering components
37
+ * for focus management.
38
+ *
39
+ * This list should be kept up to date with EUI's interactive component offerings.
40
+ */
41
+ const INTERACTIVE_EUI_COMPONENTS = exports.INTERACTIVE_EUI_COMPONENTS = ['EuiLink', 'EuiButton', 'EuiButtonEmpty', 'EuiButtonIcon', 'EuiFacetButton', 'EuiHeaderLink', 'EuiHeaderSectionItemButton', 'EuiHeaderLogo', 'EuiListGroupItem', 'EuiPinnableListGroup', 'EuiSideNav', 'EuiBreadcrumbs', 'EuiTab', 'EuiContextMenuItem', 'EuiKeyPadMenuItem', 'EuiPagination', 'EuiTreeView', 'EuiStepHorizontal', 'EuiCard', 'EuiCheckableCard', 'EuiBasicTable', 'EuiInMemoryTable', 'EuiFilterButton', 'EuiFilterSelectItem', 'EuiFilterSelectable', 'EuiBadge', 'EuiBetaBadge', 'EuiSelectable', 'EuiComboBox', 'EuiSuperSelect', 'EuiSelect', 'EuiCheckbox', 'EuiRadio', 'EuiSwitch', 'EuiButtonGroup', 'EuiRange', 'EuiDualRange', 'EuiColorPicker', 'EuiDatePicker', 'EuiSuperDatePicker'];
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Configuration describing which components accept a `label` prop
3
+ * and the baseline set of accessibility prop names allowed across components.
4
+ */
5
+ export type A11yConfig = {
6
+ interactiveComponentsWithLabel: ReadonlyArray<string>;
7
+ wrappingComponents: ReadonlyArray<string>;
8
+ baseA11yProps: ReadonlyArray<string>;
9
+ };
10
+ /**
11
+ * Compute the set of allowed accessibility prop names for a given component.
12
+ *
13
+ * - Always includes the provided `baseA11yProps`.
14
+ * - Conditionally includes `label` if the component is listed in either
15
+ * `interactiveComponentsWithLabel` or `wrappingComponents`.
16
+ * - Does **not** mutate the provided configuration; a new array is returned.
17
+ *
18
+ * @param componentName - The EUI component name (e.g., `'EuiButtonIcon'`).
19
+ * @param cfg - The accessibility configuration to use when resolving allowed props.
20
+ * @returns A new array of allowed prop names for `componentName`.
21
+ *
22
+ */
23
+ export declare function getAllowedA11yPropNamesForComponent(componentName: string, cfg: A11yConfig): string[];
24
+ //# sourceMappingURL=get_allowed_a11y_prop_names_for_component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get_allowed_a11y_prop_names_for_component.d.ts","sourceRoot":"","sources":["../../../src/utils/get_allowed_a11y_prop_names_for_component.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,8BAA8B,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACtD,kBAAkB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC1C,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CACtC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,mCAAmC,CACjD,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,UAAU,GACd,MAAM,EAAE,CAUV"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getAllowedA11yPropNamesForComponent = getAllowedA11yPropNamesForComponent;
7
+ /*
8
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
9
+ * or more contributor license agreements. Licensed under the Elastic License
10
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
11
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
12
+ * Side Public License, v 1.
13
+ */
14
+
15
+ /**
16
+ * Configuration describing which components accept a `label` prop
17
+ * and the baseline set of accessibility prop names allowed across components.
18
+ */
19
+
20
+ /**
21
+ * Compute the set of allowed accessibility prop names for a given component.
22
+ *
23
+ * - Always includes the provided `baseA11yProps`.
24
+ * - Conditionally includes `label` if the component is listed in either
25
+ * `interactiveComponentsWithLabel` or `wrappingComponents`.
26
+ * - Does **not** mutate the provided configuration; a new array is returned.
27
+ *
28
+ * @param componentName - The EUI component name (e.g., `'EuiButtonIcon'`).
29
+ * @param cfg - The accessibility configuration to use when resolving allowed props.
30
+ * @returns A new array of allowed prop names for `componentName`.
31
+ *
32
+ */
33
+ function getAllowedA11yPropNamesForComponent(componentName, cfg) {
34
+ const componentsWithLabel = new Set([...cfg.interactiveComponentsWithLabel, ...cfg.wrappingComponents]);
35
+ if (componentsWithLabel.has(componentName)) {
36
+ return [...cfg.baseA11yProps, 'label'];
37
+ }
38
+ return [...cfg.baseA11yProps];
39
+ }
@@ -1,3 +1,4 @@
1
1
  import { type TSESTree, type TSESLint } from '@typescript-eslint/utils';
2
- export declare function getAttrValue<TContext extends TSESLint.RuleContext<string, unknown[]>>(context: TContext, attributes: TSESTree.JSXOpeningElement['attributes'], attrName: string): string | undefined;
2
+ export declare function findAttrValue<TContext extends TSESLint.RuleContext<string, unknown[]>>(context: TContext, attributes: TSESTree.JSXOpeningElement['attributes'], attrName: string): string | undefined;
3
+ export declare function extractAttrValue<TContext extends TSESLint.RuleContext<string, unknown[]>>(context: TContext, attr: TSESTree.JSXAttribute | undefined): string | undefined;
3
4
  //# sourceMappingURL=get_attr_value.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get_attr_value.d.ts","sourceRoot":"","sources":["../../../src/utils/get_attr_value.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAEvE,wBAAgB,YAAY,CAC1B,QAAQ,SAAS,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,EAExD,OAAO,EAAE,QAAQ,EACjB,UAAU,EAAE,QAAQ,CAAC,iBAAiB,CAAC,YAAY,CAAC,EACpD,QAAQ,EAAE,MAAM,GACf,MAAM,GAAG,SAAS,CA2BpB"}
1
+ {"version":3,"file":"get_attr_value.d.ts","sourceRoot":"","sources":["../../../src/utils/get_attr_value.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAEvE,wBAAgB,aAAa,CAC3B,QAAQ,SAAS,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,EAExD,OAAO,EAAE,QAAQ,EACjB,UAAU,EAAE,QAAQ,CAAC,iBAAiB,CAAC,YAAY,CAAC,EACpD,QAAQ,EAAE,MAAM,sBAUjB;AAED,wBAAgB,gBAAgB,CAC9B,QAAQ,SAAS,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,EAExD,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,QAAQ,CAAC,YAAY,GAAG,SAAS,GACtC,MAAM,GAAG,SAAS,CAqBpB"}
@@ -3,28 +3,21 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getAttrValue = getAttrValue;
6
+ exports.extractAttrValue = extractAttrValue;
7
+ exports.findAttrValue = findAttrValue;
7
8
  /*
8
- * Licensed to Elasticsearch B.V. under one or more contributor
9
- * license agreements. See the NOTICE file distributed with
10
- * this work for additional information regarding copyright
11
- * ownership. Elasticsearch B.V. licenses this file to you under
12
- * the Apache License, Version 2.0 (the "License"); you may
13
- * not use this file except in compliance with the License.
14
- * You may obtain a copy of the License at
15
- *
16
- * http://www.apache.org/licenses/LICENSE-2.0
17
- *
18
- * Unless required by applicable law or agreed to in writing,
19
- * software distributed under the License is distributed on an
20
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
- * KIND, either express or implied. See the License for the
22
- * specific language governing permissions and limitations
23
- * under the License.
9
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
10
+ * or more contributor license agreements. Licensed under the Elastic License
11
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
12
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
13
+ * Side Public License, v 1.
24
14
  */
25
15
 
26
- function getAttrValue(context, attributes, attrName) {
16
+ function findAttrValue(context, attributes, attrName) {
27
17
  const attr = attributes.find(attr => attr.type === 'JSXAttribute' && attr.name.type === 'JSXIdentifier' && attr.name.name === attrName);
18
+ return extractAttrValue(context, attr);
19
+ }
20
+ function extractAttrValue(context, attr) {
28
21
  if (!attr?.value) {
29
22
  return undefined;
30
23
  }
@@ -0,0 +1,20 @@
1
+ import type { TSESTree } from '@typescript-eslint/utils';
2
+ import { type A11yConfig } from './get_allowed_a11y_prop_names_for_component';
3
+ /**
4
+ * Determines whether a JSX element declares at least one **allowed**
5
+ * accessibility-related prop for a given component.
6
+ *
7
+ * Allowed prop names are resolved via {@link getAllowedA11yPropNamesForComponent},
8
+ * which combines baseline a11y props (e.g. `aria-*`) and conditionally adds
9
+ * `label` for components that support it per the provided configuration.
10
+ *
11
+ * Only plain `JSXAttribute` nodes are considered—spread attributes are ignored here.
12
+ *
13
+ * @param componentName - The component name being checked (e.g., `"EuiButtonIcon"`).
14
+ * @param attrs - The attributes array from a `JSXOpeningElement` (ESTree).
15
+ * @param cfg - Accessibility configuration that defines base props and which
16
+ * components may accept a `label` prop.
17
+ * @returns `true` if any attribute name on the element is in the allowed set; otherwise `false`.
18
+ */
19
+ export declare function hasA11yPropForComponent(componentName: string, attrs: TSESTree.JSXOpeningElement['attributes'], cfg: A11yConfig): boolean;
20
+ //# sourceMappingURL=has_a11y_prop_for_component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"has_a11y_prop_for_component.d.ts","sourceRoot":"","sources":["../../../src/utils/has_a11y_prop_for_component.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAEL,KAAK,UAAU,EAChB,MAAM,6CAA6C,CAAC;AAErD;;;;;;;;;;;;;;;GAeG;AAEH,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,QAAQ,CAAC,iBAAiB,CAAC,YAAY,CAAC,EAC/C,GAAG,EAAE,UAAU,GACd,OAAO,CAUT"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.hasA11yPropForComponent = hasA11yPropForComponent;
7
+ var _get_allowed_a11y_prop_names_for_component = require("./get_allowed_a11y_prop_names_for_component");
8
+ /*
9
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
10
+ * or more contributor license agreements. Licensed under the Elastic License
11
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
12
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
13
+ * Side Public License, v 1.
14
+ */
15
+
16
+ /**
17
+ * Determines whether a JSX element declares at least one **allowed**
18
+ * accessibility-related prop for a given component.
19
+ *
20
+ * Allowed prop names are resolved via {@link getAllowedA11yPropNamesForComponent},
21
+ * which combines baseline a11y props (e.g. `aria-*`) and conditionally adds
22
+ * `label` for components that support it per the provided configuration.
23
+ *
24
+ * Only plain `JSXAttribute` nodes are considered—spread attributes are ignored here.
25
+ *
26
+ * @param componentName - The component name being checked (e.g., `"EuiButtonIcon"`).
27
+ * @param attrs - The attributes array from a `JSXOpeningElement` (ESTree).
28
+ * @param cfg - Accessibility configuration that defines base props and which
29
+ * components may accept a `label` prop.
30
+ * @returns `true` if any attribute name on the element is in the allowed set; otherwise `false`.
31
+ */
32
+
33
+ function hasA11yPropForComponent(componentName, attrs, cfg) {
34
+ const allowed = new Set((0, _get_allowed_a11y_prop_names_for_component.getAllowedA11yPropNamesForComponent)(componentName, cfg));
35
+ return attrs.some(attr => attr.type === 'JSXAttribute' && attr.name.type === 'JSXIdentifier' && allowed.has(attr.name.name));
36
+ }
@@ -0,0 +1,12 @@
1
+ import type { TSESTree } from '@typescript-eslint/utils';
2
+ /**
3
+ * Checks whether a JSX opening element contains a spread attribute
4
+ * (e.g., `...props`). Spreads make it impossible to statically know
5
+ * all props present on an element, so ESLint rules often use this as
6
+ * a quick bail-out to avoid false positives.
7
+ *
8
+ * @param attrs - The attributes array from a `JSXOpeningElement` node (ESTree).
9
+ * @returns `true` if any attribute is a `JSXSpreadAttribute`; otherwise `false`.
10
+ */
11
+ export declare function hasSpread(attrs: TSESTree.JSXOpeningElement['attributes']): boolean;
12
+ //# sourceMappingURL=has_spread.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"has_spread.d.ts","sourceRoot":"","sources":["../../../src/utils/has_spread.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD;;;;;;;;GAQG;AAEH,wBAAgB,SAAS,CACvB,KAAK,EAAE,QAAQ,CAAC,iBAAiB,CAAC,YAAY,CAAC,GAC9C,OAAO,CAET"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.hasSpread = hasSpread;
7
+ /*
8
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
9
+ * or more contributor license agreements. Licensed under the Elastic License
10
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
11
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
12
+ * Side Public License, v 1.
13
+ */
14
+
15
+ /**
16
+ * Checks whether a JSX opening element contains a spread attribute
17
+ * (e.g., `...props`). Spreads make it impossible to statically know
18
+ * all props present on an element, so ESLint rules often use this as
19
+ * a quick bail-out to avoid false positives.
20
+ *
21
+ * @param attrs - The attributes array from a `JSXOpeningElement` node (ESTree).
22
+ * @returns `true` if any attribute is a `JSXSpreadAttribute`; otherwise `false`.
23
+ */
24
+
25
+ function hasSpread(attrs) {
26
+ return attrs.some(a => a.type === 'JSXSpreadAttribute');
27
+ }
@@ -0,0 +1,3 @@
1
+ import { TSESTree } from '@typescript-eslint/utils';
2
+ export declare function isInConditionalRendering(node: TSESTree.JSXElement): boolean;
3
+ //# sourceMappingURL=is_in_conditional_rendering.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is_in_conditional_rendering.d.ts","sourceRoot":"","sources":["../../../src/utils/is_in_conditional_rendering.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,GAAG,OAAO,CAW3E"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isInConditionalRendering = isInConditionalRendering;
7
+ /*
8
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
9
+ * or more contributor license agreements. Licensed under the Elastic License
10
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
11
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
12
+ * Side Public License, v 1.
13
+ */
14
+
15
+ function isInConditionalRendering(node) {
16
+ let parent = node.parent;
17
+ while (parent) {
18
+ if (parent.type === 'ConditionalExpression' || parent.type === 'IfStatement' || parent.type === 'LogicalExpression' && parent.operator === '&&') {
19
+ return true;
20
+ }
21
+ parent = parent.parent;
22
+ }
23
+ return false;
24
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"resolve_member_expression_root.d.ts","sourceRoot":"","sources":["../../../src/utils/resolve_member_expression_root.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAEhE,eAAO,MAAM,2BAA2B,GACtC,MAAM,QAAQ,CAAC,gBAAgB,KAC9B,QAAQ,CAAC,UAMX,CAAC"}
1
+ {"version":3,"file":"resolve_member_expression_root.d.ts","sourceRoot":"","sources":["../../../src/utils/resolve_member_expression_root.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAEhE,eAAO,MAAM,2BAA2B,GACtC,MAAM,QAAQ,CAAC,gBAAgB,KAC9B,QAAQ,CAAC,UAMX,CAAC"}
@@ -4,6 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.resolveMemberExpressionRoot = void 0;
7
+ /*
8
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
9
+ * or more contributor license agreements. Licensed under the Elastic License
10
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
11
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
12
+ * Side Public License, v 1.
13
+ */
14
+
7
15
  const resolveMemberExpressionRoot = node => {
8
16
  if (node.object.type === 'MemberExpression') {
9
17
  return resolveMemberExpressionRoot(node.object);
package/lib/esm/index.js CHANGED
@@ -1,21 +1,10 @@
1
1
  "use strict";
2
2
  /*
3
- * Licensed to Elasticsearch B.V. under one or more contributor
4
- * license agreements. See the NOTICE file distributed with
5
- * this work for additional information regarding copyright
6
- * ownership. Elasticsearch B.V. licenses this file to you under
7
- * the Apache License, Version 2.0 (the "License"); you may
8
- * not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing,
14
- * software distributed under the License is distributed on an
15
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
- * KIND, either express or implied. See the License for the
17
- * specific language governing permissions and limitations
18
- * under the License.
3
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
4
+ * or more contributor license agreements. Licensed under the Elastic License
5
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
6
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
7
+ * Side Public License, v 1.
19
8
  */
20
9
  Object.defineProperty(exports, "__esModule", { value: true });
21
10
  const href_or_on_click_1 = require("./rules/href_or_on_click");
@@ -26,6 +15,10 @@ const consistent_is_invalid_props_1 = require("./rules/a11y/consistent_is_invali
26
15
  const sr_output_disabled_tooltip_1 = require("./rules/a11y/sr_output_disabled_tooltip");
27
16
  const prefer_eui_icon_tip_1 = require("./rules/a11y/prefer_eui_icon_tip");
28
17
  const no_unnamed_radio_group_1 = require("./rules/a11y/no_unnamed_radio_group");
18
+ const no_unnamed_interactive_element_1 = require("./rules/a11y/no_unnamed_interactive_element");
19
+ const tooltip_focusable_anchor_1 = require("./rules/a11y/tooltip_focusable_anchor");
20
+ const callout_announce_on_mount_1 = require("./rules/a11y/callout_announce_on_mount");
21
+ const accessible_interactive_element_1 = require("./rules/a11y/accessible_interactive_element");
29
22
  const config = {
30
23
  rules: {
31
24
  'href-or-on-click': href_or_on_click_1.HrefOnClick,
@@ -36,6 +29,10 @@ const config = {
36
29
  'sr-output-disabled-tooltip': sr_output_disabled_tooltip_1.ScreenReaderOutputDisabledTooltip,
37
30
  'prefer-eui-icon-tip': prefer_eui_icon_tip_1.PreferEuiIconTip,
38
31
  'no-unnamed-radio-group': no_unnamed_radio_group_1.NoUnnamedRadioGroup,
32
+ 'callout-announce-on-mount': callout_announce_on_mount_1.CallOutAnnounceOnMount,
33
+ 'no-unnamed-interactive-element': no_unnamed_interactive_element_1.NoUnnamedInteractiveElement,
34
+ 'tooltip-focusable-anchor': tooltip_focusable_anchor_1.TooltipFocusableAnchor,
35
+ 'accessible-interactive-element': accessible_interactive_element_1.AccessibleInteractiveElements,
39
36
  },
40
37
  configs: {
41
38
  recommended: {
@@ -49,6 +46,10 @@ const config = {
49
46
  '@elastic/eui/sr-output-disabled-tooltip': 'warn',
50
47
  '@elastic/eui/prefer-eui-icon-tip': 'warn',
51
48
  '@elastic/eui/no-unnamed-radio-group': 'warn',
49
+ '@elastic/eui/callout-announce-on-mount': 'warn',
50
+ '@elastic/eui/no-unnamed-interactive-element': 'warn',
51
+ '@elastic/eui/tooltip-focusable-anchor': 'warn',
52
+ '@elastic/eui/accessible-interactive-element': 'warn',
52
53
  },
53
54
  },
54
55
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAEH,+DAAuD;AACvD,iFAA2E;AAC3E,uDAAkD;AAElD,8FAAuF;AACvF,0FAAoF;AACpF,wFAA4F;AAC5F,0EAAoE;AACpE,gFAA0E;AAE1E,MAAM,MAAM,GAAG;IACb,KAAK,EAAE;QACL,kBAAkB,EAAE,8BAAW;QAC/B,2BAA2B,EAAE,kDAAsB;QACnD,cAAc,EAAE,yBAAU;QAC1B,+BAA+B,EAAE,yDAAyB;QAC1D,6BAA6B,EAAE,sDAAwB;QACvD,4BAA4B,EAAE,8DAAiC;QAC/D,qBAAqB,EAAE,sCAAgB;QACvC,wBAAwB,EAAG,4CAAmB;KAC/C;IACD,OAAO,EAAE;QACP,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,4BAA4B,CAAC;YACvC,KAAK,EAAE;gBACL,+BAA+B,EAAE,MAAM;gBACvC,wCAAwC,EAAE,MAAM;gBAChD,2BAA2B,EAAE,MAAM;gBACnC,4CAA4C,EAAE,MAAM;gBACpD,0CAA0C,EAAE,MAAM;gBAClD,yCAAyC,EAAE,MAAM;gBACjD,kCAAkC,EAAE,MAAM;gBAC1C,qCAAqC,EAAE,MAAM;aAC9C;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAGH,+DAAuD;AACvD,iFAA2E;AAC3E,uDAAkD;AAElD,8FAAuF;AACvF,0FAAoF;AACpF,wFAA4F;AAC5F,0EAAoE;AACpE,gFAA0E;AAC1E,gGAA0F;AAC1F,oFAA+E;AAC/E,sFAAgF;AAChF,gGAA4F;AAE5F,MAAM,MAAM,GAAG;IACb,KAAK,EAAE;QACL,kBAAkB,EAAE,8BAAW;QAC/B,2BAA2B,EAAE,kDAAsB;QACnD,cAAc,EAAE,yBAAU;QAC1B,+BAA+B,EAAE,yDAAyB;QAC1D,6BAA6B,EAAE,sDAAwB;QACvD,4BAA4B,EAAE,8DAAiC;QAC/D,qBAAqB,EAAE,sCAAgB;QACvC,wBAAwB,EAAG,4CAAmB;QAC9C,2BAA2B,EAAE,kDAAsB;QACnD,gCAAgC,EAAE,4DAA2B;QAC7D,0BAA0B,EAAE,iDAAsB;QAClD,gCAAgC,EAAE,8DAA6B;KAChE;IACD,OAAO,EAAE;QACP,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,4BAA4B,CAAC;YACvC,KAAK,EAAE;gBACL,+BAA+B,EAAE,MAAM;gBACvC,wCAAwC,EAAE,MAAM;gBAChD,2BAA2B,EAAE,MAAM;gBACnC,4CAA4C,EAAE,MAAM;gBACpD,0CAA0C,EAAE,MAAM;gBAClD,yCAAyC,EAAE,MAAM;gBACjD,kCAAkC,EAAE,MAAM;gBAC1C,qCAAqC,EAAE,MAAM;gBAC7C,wCAAwC,EAAE,MAAM;gBAChD,6CAA6C,EAAE,MAAM;gBACrD,uCAAuC,EAAE,MAAM;gBAC/C,6CAA6C,EAAE,MAAM;aACtD;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { ESLintUtils } from '@typescript-eslint/utils';
2
+ export declare const AccessibleInteractiveElements: ESLintUtils.RuleModule<"disallowTabIndex", [], unknown, ESLintUtils.RuleListener>;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
4
+ * or more contributor license agreements. Licensed under the Elastic License
5
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
6
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
7
+ * Side Public License, v 1.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.AccessibleInteractiveElements = void 0;
11
+ const utils_1 = require("@typescript-eslint/utils");
12
+ const constants_1 = require("../../utils/constants");
13
+ const get_attr_value_1 = require("../../utils/get_attr_value");
14
+ exports.AccessibleInteractiveElements = utils_1.ESLintUtils.RuleCreator.withoutDocs({
15
+ create(context) {
16
+ return {
17
+ JSXOpeningElement(node) {
18
+ if (node.name.type !== 'JSXIdentifier')
19
+ return;
20
+ const componentName = node.name.name;
21
+ if (!constants_1.INTERACTIVE_EUI_COMPONENTS.includes(componentName))
22
+ return;
23
+ const tabIndexAttribute = node.attributes.find((attr) => attr.type === 'JSXAttribute' &&
24
+ attr.name.type === 'JSXIdentifier' &&
25
+ attr.name.name === 'tabIndex');
26
+ if (tabIndexAttribute && (Number((0, get_attr_value_1.extractAttrValue)(context, tabIndexAttribute)) || 0) === -1) {
27
+ context.report({
28
+ node: node,
29
+ messageId: 'disallowTabIndex',
30
+ data: { component: componentName },
31
+ fix: fixer => fixer.remove(tabIndexAttribute),
32
+ });
33
+ }
34
+ },
35
+ };
36
+ },
37
+ meta: {
38
+ type: 'problem',
39
+ docs: {
40
+ description: 'Ensure interactive EUI components remain accessible by prohibiting tabIndex={-1}, which removes them from keyboard navigation.',
41
+ },
42
+ fixable: 'code',
43
+ schema: [],
44
+ messages: {
45
+ disallowTabIndex: '{{component}} is an interactive EUI component and must not use tabIndex={-1}, as this removes it from keyboard navigation and impairs accessibility.',
46
+ },
47
+ },
48
+ defaultOptions: [],
49
+ });
50
+ //# sourceMappingURL=accessible_interactive_element.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessible_interactive_element.js","sourceRoot":"","sources":["../../../../src/rules/a11y/accessible_interactive_element.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,oDAAsE;AACtE,qDAAmE;AACnE,+DAA8D;AAEjD,QAAA,6BAA6B,GAAG,mBAAW,CAAC,WAAW,CAAC,WAAW,CAAC;IAC/E,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,iBAAiB,CAAC,IAAI;gBACpB,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,eAAe;oBAAE,OAAO;gBAC/C,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBACrC,IAAI,CAAC,sCAA0B,CAAC,QAAQ,CAAC,aAAa,CAAC;oBAAE,OAAO;gBAEhE,MAAM,iBAAiB,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAC5C,CAAC,IAAI,EAAiC,EAAE,CACtC,IAAI,CAAC,IAAI,KAAK,cAAc;oBAC5B,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,eAAe;oBAClC,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAChC,CAAC;gBAGF,IAAI,iBAAiB,IAAI,CAAC,MAAM,CAAC,IAAA,iCAAgB,EAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;oBAC5F,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI,EAAG,IAAI;wBACX,SAAS,EAAE,kBAAkB;wBAC7B,IAAI,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE;wBAClC,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC;qBAC9C,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,gIAAgI;SAC9I;QACD,OAAO,EAAE,MAAM;QACf,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE;YACR,gBAAgB,EAAE,sJAAsJ;SACzK;KACF;IACD,cAAc,EAAE,EAAE;CACnB,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { ESLintUtils } from '@typescript-eslint/utils';
2
+ export declare const CallOutAnnounceOnMount: ESLintUtils.RuleModule<"missingAnnounceOnMount", [], unknown, ESLintUtils.RuleListener>;