Commit 434c5b3
authored
# Backport
This will backport the following commits from `main` to `8.19`:
- [[Scout][a11y] adding `axe-core` validation
(#243953)](#243953)
<!--- Backport version: 10.2.0 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT [{"author":{"name":"Alexey
Antonov","email":"alexwizp@gmail.com"},"sourceCommit":{"committedDate":"2025-12-01T13:38:23Z","message":"[Scout][a11y]
adding `axe-core` validation (#243953)\n\n**Summary**\n- Integrates
`axe-core` accessibility checks into our test-suite for\n`Scout`.\n-
Adds a shared helper `checkA11y` that runs axe on a given DOM
context.\n- Targets automated detection of common accessibility issues
(color\ncontrast, missing ARIA, etc.) so we catch regressions
earlier.\nConfiguration is unified with Cypress and FTR\n\n**Why**\n-
Improve accessibility coverage by running automated checks in-unit
and\nin functional tests.\n- Provide a simple, reusable helper for tests
so authors can validate\naccessibility as part of normal test
work.\n\n**What changed**\n- Adds `axe-core` dependency and wiring to
run it in tests.\n- Introduces `checkA11y` helper used by existing
tests. This method is\naccessible through the `Page` object.\n\n**How to
use**\n> [!NOTE]\n>We recommend running `checkA11y` with the `include`
parameter set to\nthe root element you are testing. This makes the tests
more isolated and\nreduces the time required to analyze the DOM
structure.\n\n```\ntest('an example of using the checkA11y check', async
({ page }) => {\n ....\n \n const { violations } = await
page.checkA11y({ include: ['{CSS selector of root element you are
testing}'] });\n expect(violations).toHaveLength(0);\n});\n\n```\n\n\n##
Screens\n\n**Example of report**\n\n<img width=\"963\" height=\"326\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c8450ad8-deea-47c3-a4d7-e7e2e0a73d88\"\n/>\n\n\n**ESLint
issue*\n\n<img width=\"963\" height=\"326\" alt=\"Screenshot 2025-11-28
at 15 23
55\"\nsrc=\"https://github.com/user-attachments/assets/387400ac-4fb8-45d6-9649-09f7ee3fb8f5\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Copilot
<175728472+Copilot@users.noreply.github.com>","sha":"1caf007ff13a21654ba74a596bf3614348adc424","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","test:scout","v9.3.0"],"title":"[Scout][a11y]
adding `axe-core`
validation","number":243953,"url":"https://github.com/elastic/kibana/pull/243953","mergeCommit":{"message":"[Scout][a11y]
adding `axe-core` validation (#243953)\n\n**Summary**\n- Integrates
`axe-core` accessibility checks into our test-suite for\n`Scout`.\n-
Adds a shared helper `checkA11y` that runs axe on a given DOM
context.\n- Targets automated detection of common accessibility issues
(color\ncontrast, missing ARIA, etc.) so we catch regressions
earlier.\nConfiguration is unified with Cypress and FTR\n\n**Why**\n-
Improve accessibility coverage by running automated checks in-unit
and\nin functional tests.\n- Provide a simple, reusable helper for tests
so authors can validate\naccessibility as part of normal test
work.\n\n**What changed**\n- Adds `axe-core` dependency and wiring to
run it in tests.\n- Introduces `checkA11y` helper used by existing
tests. This method is\naccessible through the `Page` object.\n\n**How to
use**\n> [!NOTE]\n>We recommend running `checkA11y` with the `include`
parameter set to\nthe root element you are testing. This makes the tests
more isolated and\nreduces the time required to analyze the DOM
structure.\n\n```\ntest('an example of using the checkA11y check', async
({ page }) => {\n ....\n \n const { violations } = await
page.checkA11y({ include: ['{CSS selector of root element you are
testing}'] });\n expect(violations).toHaveLength(0);\n});\n\n```\n\n\n##
Screens\n\n**Example of report**\n\n<img width=\"963\" height=\"326\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c8450ad8-deea-47c3-a4d7-e7e2e0a73d88\"\n/>\n\n\n**ESLint
issue*\n\n<img width=\"963\" height=\"326\" alt=\"Screenshot 2025-11-28
at 15 23
55\"\nsrc=\"https://github.com/user-attachments/assets/387400ac-4fb8-45d6-9649-09f7ee3fb8f5\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Copilot
<175728472+Copilot@users.noreply.github.com>","sha":"1caf007ff13a21654ba74a596bf3614348adc424"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/243953","number":243953,"mergeCommit":{"message":"[Scout][a11y]
adding `axe-core` validation (#243953)\n\n**Summary**\n- Integrates
`axe-core` accessibility checks into our test-suite for\n`Scout`.\n-
Adds a shared helper `checkA11y` that runs axe on a given DOM
context.\n- Targets automated detection of common accessibility issues
(color\ncontrast, missing ARIA, etc.) so we catch regressions
earlier.\nConfiguration is unified with Cypress and FTR\n\n**Why**\n-
Improve accessibility coverage by running automated checks in-unit
and\nin functional tests.\n- Provide a simple, reusable helper for tests
so authors can validate\naccessibility as part of normal test
work.\n\n**What changed**\n- Adds `axe-core` dependency and wiring to
run it in tests.\n- Introduces `checkA11y` helper used by existing
tests. This method is\naccessible through the `Page` object.\n\n**How to
use**\n> [!NOTE]\n>We recommend running `checkA11y` with the `include`
parameter set to\nthe root element you are testing. This makes the tests
more isolated and\nreduces the time required to analyze the DOM
structure.\n\n```\ntest('an example of using the checkA11y check', async
({ page }) => {\n ....\n \n const { violations } = await
page.checkA11y({ include: ['{CSS selector of root element you are
testing}'] });\n expect(violations).toHaveLength(0);\n});\n\n```\n\n\n##
Screens\n\n**Example of report**\n\n<img width=\"963\" height=\"326\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c8450ad8-deea-47c3-a4d7-e7e2e0a73d88\"\n/>\n\n\n**ESLint
issue*\n\n<img width=\"963\" height=\"326\" alt=\"Screenshot 2025-11-28
at 15 23
55\"\nsrc=\"https://github.com/user-attachments/assets/387400ac-4fb8-45d6-9649-09f7ee3fb8f5\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Copilot
<175728472+Copilot@users.noreply.github.com>","sha":"1caf007ff13a21654ba74a596bf3614348adc424"}}]}]
BACKPORT-->
1 parent 74fb7f3 commit 434c5b3
14 files changed
Lines changed: 372 additions & 7 deletions
File tree
- packages/kbn-eslint-plugin-eslint
- rules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2348 | 2348 | | |
2349 | 2349 | | |
2350 | 2350 | | |
| 2351 | + | |
2351 | 2352 | | |
2352 | 2353 | | |
2353 | 2354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1357 | 1357 | | |
1358 | 1358 | | |
1359 | 1359 | | |
| 1360 | + | |
1360 | 1361 | | |
1361 | 1362 | | |
1362 | 1363 | | |
| |||
1761 | 1762 | | |
1762 | 1763 | | |
1763 | 1764 | | |
1764 | | - | |
| 1765 | + | |
1765 | 1766 | | |
1766 | 1767 | | |
1767 | 1768 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
Lines changed: 67 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
Lines changed: 111 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
| 253 | + | |
253 | 254 | | |
254 | 255 | | |
255 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
34 | 46 | | |
35 | 47 | | |
36 | 48 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
109 | 113 | | |
110 | 114 | | |
111 | 115 | | |
| |||
Lines changed: 100 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
0 commit comments