Skip to content

[Ingest pipelines] A11y: Fix Define as Json announcement#261896

Merged
SoniaSanzV merged 1 commit intoelastic:mainfrom
SoniaSanzV:a11y/ingest_pipelines-define_as_json_announcement#218059
Apr 10, 2026
Merged

[Ingest pipelines] A11y: Fix Define as Json announcement#261896
SoniaSanzV merged 1 commit intoelastic:mainfrom
SoniaSanzV:a11y/ingest_pipelines-define_as_json_announcement#218059

Conversation

@SoniaSanzV
Copy link
Copy Markdown
Contributor

@SoniaSanzV SoniaSanzV commented Apr 8, 2026

Closes #218059

Summary

  • When toggling between "Define as JSON" and "Define as text" in the Append processor form (and any other processor that uses XJsonToggle), the focused link unmounted without restoring focus, leaving document.activeElement as <body>. NVDA then scanned from body and announced the first visited link in view — the "Ingest Pipelines" breadcrumb — confusing screen reader users.
  • Fixed by sharing a callback ref across both toggle links. A pending-focus flag is set when the toggle is activated; when React mounts the replacement link, the flag is read and focus() is called immediately, keeping focus inside the form.

Test plan

Manual — Windows 11 + NVDA:

  1. Stack Management → Ingest Pipelines → Create pipeline.
  2. Add a processor → select Append.
  3. Activate the Define as JSON toggle (click or keyboard Enter).
    • Verify: focus is on "Define as text"; NVDA announces "Define as text button" (no breadcrumb or navigation announced).
  4. Activate Define as text.
    • Verify: focus is on "Define as JSON"; NVDA announces "Define as JSON button".

Evidence (screenshots / screen recording)

Screenshot 2026-04-08 at 09 41 48
@SoniaSanzV SoniaSanzV self-assigned this Apr 8, 2026
@SoniaSanzV SoniaSanzV requested a review from a team as a code owner April 8, 2026 07:55
@SoniaSanzV SoniaSanzV added release_note:fix Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// Feature:Ingest Node Pipelines Ingest node pipelines management backport:all-open Backport to all branches that could still receive a release labels Apr 8, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

Copy link
Copy Markdown
Member

@sabarasaba sabarasaba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes lgtm!

@SoniaSanzV SoniaSanzV merged commit 7450f1f into elastic:main Apr 10, 2026
29 checks passed
@SoniaSanzV SoniaSanzV deleted the a11y/ingest_pipelines-define_as_json_announcement#218059 branch April 10, 2026 07:51
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19, 9.2, 9.3

https://github.com/elastic/kibana/actions/runs/24232637295

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 10, 2026
)

Closes elastic#218059
## Summary
- When toggling between "Define as JSON" and "Define as text" in the
Append processor form (and any other processor that uses `XJsonToggle`),
the focused link unmounted without restoring focus, leaving
`document.activeElement` as `<body>`. NVDA then scanned from body and
announced the first visited link in view — the "Ingest Pipelines"
breadcrumb — confusing screen reader users.
- Fixed by sharing a callback ref across both toggle links. A
pending-focus flag is set when the toggle is activated; when React
mounts the replacement link, the flag is read and `focus()` is called
immediately, keeping focus inside the form.
### Test plan
Manual — Windows 11 + NVDA:
1. Stack Management → Ingest Pipelines → Create pipeline.
2. Add a processor → select **Append**.
3. Activate the **Define as JSON** toggle (click or keyboard Enter).
- Verify: focus is on "Define as text"; NVDA announces "Define as text
button" (no breadcrumb or navigation announced).
4. Activate **Define as text**.
- Verify: focus is on "Define as JSON"; NVDA announces "Define as JSON
button".
### Evidence (screenshots / screen recording)
<img width="994" height="455" alt="Screenshot 2026-04-08 at 09 41 48"
src="https://github.com/user-attachments/assets/6c9f84e2-e7e0-4196-a529-825593b796f5"
/>

(cherry picked from commit 7450f1f)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 10, 2026
)

Closes elastic#218059
## Summary
- When toggling between "Define as JSON" and "Define as text" in the
Append processor form (and any other processor that uses `XJsonToggle`),
the focused link unmounted without restoring focus, leaving
`document.activeElement` as `<body>`. NVDA then scanned from body and
announced the first visited link in view — the "Ingest Pipelines"
breadcrumb — confusing screen reader users.
- Fixed by sharing a callback ref across both toggle links. A
pending-focus flag is set when the toggle is activated; when React
mounts the replacement link, the flag is read and `focus()` is called
immediately, keeping focus inside the form.
### Test plan
Manual — Windows 11 + NVDA:
1. Stack Management → Ingest Pipelines → Create pipeline.
2. Add a processor → select **Append**.
3. Activate the **Define as JSON** toggle (click or keyboard Enter).
- Verify: focus is on "Define as text"; NVDA announces "Define as text
button" (no breadcrumb or navigation announced).
4. Activate **Define as text**.
- Verify: focus is on "Define as JSON"; NVDA announces "Define as JSON
button".
### Evidence (screenshots / screen recording)
<img width="994" height="455" alt="Screenshot 2026-04-08 at 09 41 48"
src="https://github.com/user-attachments/assets/6c9f84e2-e7e0-4196-a529-825593b796f5"
/>

(cherry picked from commit 7450f1f)
@kibanamachine
Copy link
Copy Markdown
Contributor

💔 Some backports could not be created

Status Branch Result
8.19 Backport failed because of merge conflicts
9.2
9.3

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 261896

Questions ?

Please refer to the Backport tool documentation

@SoniaSanzV SoniaSanzV added backport:version Backport to applied version labels v9.3.4 v9.2.9 and removed backport:all-open Backport to all branches that could still receive a release labels Apr 10, 2026
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.2, 9.3

https://github.com/elastic/kibana/actions/runs/24233287517

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 10, 2026
)

Closes elastic#218059
## Summary
- When toggling between "Define as JSON" and "Define as text" in the
Append processor form (and any other processor that uses `XJsonToggle`),
the focused link unmounted without restoring focus, leaving
`document.activeElement` as `<body>`. NVDA then scanned from body and
announced the first visited link in view — the "Ingest Pipelines"
breadcrumb — confusing screen reader users.
- Fixed by sharing a callback ref across both toggle links. A
pending-focus flag is set when the toggle is activated; when React
mounts the replacement link, the flag is read and `focus()` is called
immediately, keeping focus inside the form.
### Test plan
Manual — Windows 11 + NVDA:
1. Stack Management → Ingest Pipelines → Create pipeline.
2. Add a processor → select **Append**.
3. Activate the **Define as JSON** toggle (click or keyboard Enter).
- Verify: focus is on "Define as text"; NVDA announces "Define as text
button" (no breadcrumb or navigation announced).
4. Activate **Define as text**.
- Verify: focus is on "Define as JSON"; NVDA announces "Define as JSON
button".
### Evidence (screenshots / screen recording)
<img width="994" height="455" alt="Screenshot 2026-04-08 at 09 41 48"
src="https://github.com/user-attachments/assets/6c9f84e2-e7e0-4196-a529-825593b796f5"
/>

(cherry picked from commit 7450f1f)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 10, 2026
)

Closes elastic#218059
## Summary
- When toggling between "Define as JSON" and "Define as text" in the
Append processor form (and any other processor that uses `XJsonToggle`),
the focused link unmounted without restoring focus, leaving
`document.activeElement` as `<body>`. NVDA then scanned from body and
announced the first visited link in view — the "Ingest Pipelines"
breadcrumb — confusing screen reader users.
- Fixed by sharing a callback ref across both toggle links. A
pending-focus flag is set when the toggle is activated; when React
mounts the replacement link, the flag is read and `focus()` is called
immediately, keeping focus inside the form.
### Test plan
Manual — Windows 11 + NVDA:
1. Stack Management → Ingest Pipelines → Create pipeline.
2. Add a processor → select **Append**.
3. Activate the **Define as JSON** toggle (click or keyboard Enter).
- Verify: focus is on "Define as text"; NVDA announces "Define as text
button" (no breadcrumb or navigation announced).
4. Activate **Define as text**.
- Verify: focus is on "Define as JSON"; NVDA announces "Define as JSON
button".
### Evidence (screenshots / screen recording)
<img width="994" height="455" alt="Screenshot 2026-04-08 at 09 41 48"
src="https://github.com/user-attachments/assets/6c9f84e2-e7e0-4196-a529-825593b796f5"
/>

(cherry picked from commit 7450f1f)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
9.2
9.3

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Apr 10, 2026
…) (#262447)

# Backport

This will backport the following commits from `main` to `9.3`:
- [[Ingest pipelines] A11y: Fix Define as Json announcement
(#261896)](#261896)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Sonia Sanz
Vivas","email":"sonia.sanzvivas@elastic.co"},"sourceCommit":{"committedDate":"2026-04-10T07:51:43Z","message":"[Ingest
pipelines] A11y: Fix Define as Json announcement (#261896)\n\nCloses
https://github.com/elastic/kibana/issues/218059\n## Summary\n- When
toggling between \"Define as JSON\" and \"Define as text\" in
the\nAppend processor form (and any other processor that uses
`XJsonToggle`),\nthe focused link unmounted without restoring focus,
leaving\n`document.activeElement` as `<body>`. NVDA then scanned from
body and\nannounced the first visited link in view — the \"Ingest
Pipelines\"\nbreadcrumb — confusing screen reader users.\n- Fixed by
sharing a callback ref across both toggle links. A\npending-focus flag
is set when the toggle is activated; when React\nmounts the replacement
link, the flag is read and `focus()` is called\nimmediately, keeping
focus inside the form.\n### Test plan\nManual — Windows 11 + NVDA:\n1.
Stack Management → Ingest Pipelines → Create pipeline.\n2. Add a
processor → select **Append**.\n3. Activate the **Define as JSON**
toggle (click or keyboard Enter).\n- Verify: focus is on \"Define as
text\"; NVDA announces \"Define as text\nbutton\" (no breadcrumb or
navigation announced).\n4. Activate **Define as text**.\n- Verify: focus
is on \"Define as JSON\"; NVDA announces \"Define as
JSON\nbutton\".\n### Evidence (screenshots / screen recording)\n<img
width=\"994\" height=\"455\" alt=\"Screenshot 2026-04-08 at 09 41
48\"\nsrc=\"https://github.com/user-attachments/assets/6c9f84e2-e7e0-4196-a529-825593b796f5\"\n/>","sha":"7450f1f2ff7cb0b8096af13042cacf07e6b0ac49","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Kibana
Management","Feature:Ingest Node
Pipelines","backport:all-open","v9.4.0"],"title":"[Ingest pipelines]
A11y: Fix Define as Json
announcement","number":261896,"url":"https://github.com/elastic/kibana/pull/261896","mergeCommit":{"message":"[Ingest
pipelines] A11y: Fix Define as Json announcement (#261896)\n\nCloses
https://github.com/elastic/kibana/issues/218059\n## Summary\n- When
toggling between \"Define as JSON\" and \"Define as text\" in
the\nAppend processor form (and any other processor that uses
`XJsonToggle`),\nthe focused link unmounted without restoring focus,
leaving\n`document.activeElement` as `<body>`. NVDA then scanned from
body and\nannounced the first visited link in view — the \"Ingest
Pipelines\"\nbreadcrumb — confusing screen reader users.\n- Fixed by
sharing a callback ref across both toggle links. A\npending-focus flag
is set when the toggle is activated; when React\nmounts the replacement
link, the flag is read and `focus()` is called\nimmediately, keeping
focus inside the form.\n### Test plan\nManual — Windows 11 + NVDA:\n1.
Stack Management → Ingest Pipelines → Create pipeline.\n2. Add a
processor → select **Append**.\n3. Activate the **Define as JSON**
toggle (click or keyboard Enter).\n- Verify: focus is on \"Define as
text\"; NVDA announces \"Define as text\nbutton\" (no breadcrumb or
navigation announced).\n4. Activate **Define as text**.\n- Verify: focus
is on \"Define as JSON\"; NVDA announces \"Define as
JSON\nbutton\".\n### Evidence (screenshots / screen recording)\n<img
width=\"994\" height=\"455\" alt=\"Screenshot 2026-04-08 at 09 41
48\"\nsrc=\"https://github.com/user-attachments/assets/6c9f84e2-e7e0-4196-a529-825593b796f5\"\n/>","sha":"7450f1f2ff7cb0b8096af13042cacf07e6b0ac49"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/261896","number":261896,"mergeCommit":{"message":"[Ingest
pipelines] A11y: Fix Define as Json announcement (#261896)\n\nCloses
https://github.com/elastic/kibana/issues/218059\n## Summary\n- When
toggling between \"Define as JSON\" and \"Define as text\" in
the\nAppend processor form (and any other processor that uses
`XJsonToggle`),\nthe focused link unmounted without restoring focus,
leaving\n`document.activeElement` as `<body>`. NVDA then scanned from
body and\nannounced the first visited link in view — the \"Ingest
Pipelines\"\nbreadcrumb — confusing screen reader users.\n- Fixed by
sharing a callback ref across both toggle links. A\npending-focus flag
is set when the toggle is activated; when React\nmounts the replacement
link, the flag is read and `focus()` is called\nimmediately, keeping
focus inside the form.\n### Test plan\nManual — Windows 11 + NVDA:\n1.
Stack Management → Ingest Pipelines → Create pipeline.\n2. Add a
processor → select **Append**.\n3. Activate the **Define as JSON**
toggle (click or keyboard Enter).\n- Verify: focus is on \"Define as
text\"; NVDA announces \"Define as text\nbutton\" (no breadcrumb or
navigation announced).\n4. Activate **Define as text**.\n- Verify: focus
is on \"Define as JSON\"; NVDA announces \"Define as
JSON\nbutton\".\n### Evidence (screenshots / screen recording)\n<img
width=\"994\" height=\"455\" alt=\"Screenshot 2026-04-08 at 09 41
48\"\nsrc=\"https://github.com/user-attachments/assets/6c9f84e2-e7e0-4196-a529-825593b796f5\"\n/>","sha":"7450f1f2ff7cb0b8096af13042cacf07e6b0ac49"}}]}]
BACKPORT-->

Co-authored-by: Sonia Sanz Vivas <sonia.sanzvivas@elastic.co>
kibanamachine added a commit that referenced this pull request Apr 10, 2026
…) (#262446)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[Ingest pipelines] A11y: Fix Define as Json announcement
(#261896)](#261896)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Sonia Sanz
Vivas","email":"sonia.sanzvivas@elastic.co"},"sourceCommit":{"committedDate":"2026-04-10T07:51:43Z","message":"[Ingest
pipelines] A11y: Fix Define as Json announcement (#261896)\n\nCloses
https://github.com/elastic/kibana/issues/218059\n## Summary\n- When
toggling between \"Define as JSON\" and \"Define as text\" in
the\nAppend processor form (and any other processor that uses
`XJsonToggle`),\nthe focused link unmounted without restoring focus,
leaving\n`document.activeElement` as `<body>`. NVDA then scanned from
body and\nannounced the first visited link in view — the \"Ingest
Pipelines\"\nbreadcrumb — confusing screen reader users.\n- Fixed by
sharing a callback ref across both toggle links. A\npending-focus flag
is set when the toggle is activated; when React\nmounts the replacement
link, the flag is read and `focus()` is called\nimmediately, keeping
focus inside the form.\n### Test plan\nManual — Windows 11 + NVDA:\n1.
Stack Management → Ingest Pipelines → Create pipeline.\n2. Add a
processor → select **Append**.\n3. Activate the **Define as JSON**
toggle (click or keyboard Enter).\n- Verify: focus is on \"Define as
text\"; NVDA announces \"Define as text\nbutton\" (no breadcrumb or
navigation announced).\n4. Activate **Define as text**.\n- Verify: focus
is on \"Define as JSON\"; NVDA announces \"Define as
JSON\nbutton\".\n### Evidence (screenshots / screen recording)\n<img
width=\"994\" height=\"455\" alt=\"Screenshot 2026-04-08 at 09 41
48\"\nsrc=\"https://github.com/user-attachments/assets/6c9f84e2-e7e0-4196-a529-825593b796f5\"\n/>","sha":"7450f1f2ff7cb0b8096af13042cacf07e6b0ac49","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Kibana
Management","Feature:Ingest Node
Pipelines","backport:all-open","v9.4.0"],"title":"[Ingest pipelines]
A11y: Fix Define as Json
announcement","number":261896,"url":"https://github.com/elastic/kibana/pull/261896","mergeCommit":{"message":"[Ingest
pipelines] A11y: Fix Define as Json announcement (#261896)\n\nCloses
https://github.com/elastic/kibana/issues/218059\n## Summary\n- When
toggling between \"Define as JSON\" and \"Define as text\" in
the\nAppend processor form (and any other processor that uses
`XJsonToggle`),\nthe focused link unmounted without restoring focus,
leaving\n`document.activeElement` as `<body>`. NVDA then scanned from
body and\nannounced the first visited link in view — the \"Ingest
Pipelines\"\nbreadcrumb — confusing screen reader users.\n- Fixed by
sharing a callback ref across both toggle links. A\npending-focus flag
is set when the toggle is activated; when React\nmounts the replacement
link, the flag is read and `focus()` is called\nimmediately, keeping
focus inside the form.\n### Test plan\nManual — Windows 11 + NVDA:\n1.
Stack Management → Ingest Pipelines → Create pipeline.\n2. Add a
processor → select **Append**.\n3. Activate the **Define as JSON**
toggle (click or keyboard Enter).\n- Verify: focus is on \"Define as
text\"; NVDA announces \"Define as text\nbutton\" (no breadcrumb or
navigation announced).\n4. Activate **Define as text**.\n- Verify: focus
is on \"Define as JSON\"; NVDA announces \"Define as
JSON\nbutton\".\n### Evidence (screenshots / screen recording)\n<img
width=\"994\" height=\"455\" alt=\"Screenshot 2026-04-08 at 09 41
48\"\nsrc=\"https://github.com/user-attachments/assets/6c9f84e2-e7e0-4196-a529-825593b796f5\"\n/>","sha":"7450f1f2ff7cb0b8096af13042cacf07e6b0ac49"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/261896","number":261896,"mergeCommit":{"message":"[Ingest
pipelines] A11y: Fix Define as Json announcement (#261896)\n\nCloses
https://github.com/elastic/kibana/issues/218059\n## Summary\n- When
toggling between \"Define as JSON\" and \"Define as text\" in
the\nAppend processor form (and any other processor that uses
`XJsonToggle`),\nthe focused link unmounted without restoring focus,
leaving\n`document.activeElement` as `<body>`. NVDA then scanned from
body and\nannounced the first visited link in view — the \"Ingest
Pipelines\"\nbreadcrumb — confusing screen reader users.\n- Fixed by
sharing a callback ref across both toggle links. A\npending-focus flag
is set when the toggle is activated; when React\nmounts the replacement
link, the flag is read and `focus()` is called\nimmediately, keeping
focus inside the form.\n### Test plan\nManual — Windows 11 + NVDA:\n1.
Stack Management → Ingest Pipelines → Create pipeline.\n2. Add a
processor → select **Append**.\n3. Activate the **Define as JSON**
toggle (click or keyboard Enter).\n- Verify: focus is on \"Define as
text\"; NVDA announces \"Define as text\nbutton\" (no breadcrumb or
navigation announced).\n4. Activate **Define as text**.\n- Verify: focus
is on \"Define as JSON\"; NVDA announces \"Define as
JSON\nbutton\".\n### Evidence (screenshots / screen recording)\n<img
width=\"994\" height=\"455\" alt=\"Screenshot 2026-04-08 at 09 41
48\"\nsrc=\"https://github.com/user-attachments/assets/6c9f84e2-e7e0-4196-a529-825593b796f5\"\n/>","sha":"7450f1f2ff7cb0b8096af13042cacf07e6b0ac49"}}]}]
BACKPORT-->

Co-authored-by: Sonia Sanz Vivas <sonia.sanzvivas@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:Ingest Node Pipelines Ingest node pipelines management release_note:fix Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v9.2.9 v9.3.4 v9.4.0

4 participants