Commit 45c828e
authored
# Backport
This will backport the following commits from `main` to `9.2`:
- [[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"}},{"url":"https://github.com/elastic/kibana/pull/244796","number":244796,"branch":"8.19","state":"OPEN"}]}]
BACKPORT-->
1 parent 51c7c0f commit 45c828e
15 files changed
Lines changed: 373 additions & 7 deletions
File tree
- .buildkite/scripts/steps/security
- packages/kbn-eslint-plugin-eslint
- rules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2469 | 2469 | | |
2470 | 2470 | | |
2471 | 2471 | | |
| 2472 | + | |
2472 | 2473 | | |
2473 | 2474 | | |
2474 | 2475 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1437 | 1437 | | |
1438 | 1438 | | |
1439 | 1439 | | |
| 1440 | + | |
1440 | 1441 | | |
1441 | 1442 | | |
1442 | 1443 | | |
| |||
1856 | 1857 | | |
1857 | 1858 | | |
1858 | 1859 | | |
1859 | | - | |
| 1860 | + | |
1860 | 1861 | | |
1861 | 1862 | | |
1862 | 1863 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
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 | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
| 249 | + | |
| 250 | + | |
250 | 251 | | |
251 | 252 | | |
252 | 253 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
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 | | |
| |||
0 commit comments