Skip to content

[Search] Replace aria-selected with aria-expanded on Result toggle button#260561

Merged
seialkali merged 1 commit into
elastic:mainfrom
seialkali:fix-a11y-invalid-aria-select
Mar 31, 2026
Merged

[Search] Replace aria-selected with aria-expanded on Result toggle button#260561
seialkali merged 1 commit into
elastic:mainfrom
seialkali:fix-a11y-invalid-aria-select

Conversation

@seialkali
Copy link
Copy Markdown
Contributor

@seialkali seialkali commented Mar 31, 2026

Summary

Summary

Fixes a critical aria-allowed-attr accessibility violation in the Result component (@kbn/search-index-documents).

The "Show more fields" EuiButtonIcon was using aria-selected to communicate its toggle state, but aria-selected is not a valid ARIA attribute for the button role. This was replaced with aria-expanded, which is the semantically correct attribute for a button that controls the visibility of related content.

@seialkali seialkali requested a review from a team as a code owner March 31, 2026 19:18
@seialkali seialkali added release_note:skip Skip the PR/issue when compiling release notes Team:Search backport:all-open Backport to all branches that could still receive a release v9.4.0 labels Mar 31, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented Mar 31, 2026

Approvability

Verdict: Needs human review

This is a straightforward accessibility fix (replacing incorrect aria-selected with correct aria-expanded on a toggle button) with no runtime behavior impact. However, the file is owned by @elastic/search-kibana and the author is not a designated code owner, so the designated team should review.

You can customize Macroscope's approvability policy. Learn more.

@seialkali seialkali enabled auto-merge (squash) March 31, 2026 19:41
@seialkali seialkali merged commit 70d4f49 into elastic:main Mar 31, 2026
31 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19, 9.2, 9.3

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

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #209 / Entity Analytics - Entity Resolution @ess @serverless @skipInServerlessMKI Entity Resolution CSV Upload should link matching entities to a target

Metrics [docs]

✅ unchanged

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 31, 2026
…tton (elastic#260561)

## Summary

## Summary

Fixes a critical `aria-allowed-attr` accessibility violation in the
`Result` component (`@kbn/search-index-documents`).

The "Show more fields" `EuiButtonIcon` was using `aria-selected` to
communicate its toggle state, but `aria-selected` is not a valid ARIA
attribute for the `button` role. This was replaced with `aria-expanded`,
which is the semantically correct attribute for a button that controls
the visibility of related content.

(cherry picked from commit 70d4f49)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 31, 2026
…tton (elastic#260561)

## Summary

## Summary

Fixes a critical `aria-allowed-attr` accessibility violation in the
`Result` component (`@kbn/search-index-documents`).

The "Show more fields" `EuiButtonIcon` was using `aria-selected` to
communicate its toggle state, but `aria-selected` is not a valid ARIA
attribute for the `button` role. This was replaced with `aria-expanded`,
which is the semantically correct attribute for a button that controls
the visibility of related content.

(cherry picked from commit 70d4f49)
@kibanamachine
Copy link
Copy Markdown
Contributor

💔 Some backports could not be created

Status Branch Result
8.19 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.19:
- Add draft PR guidance to AGENTS.md (#260536)
- [Build] Add flag to revert to glibc 2.42 memory management (#255699)
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 260561

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Mar 31, 2026
…gle button (#260561) (#260581)

# Backport

This will backport the following commits from `main` to `9.3`:
- [[Search] Replace aria-selected with aria-expanded on Result toggle
button (#260561)](#260561)

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

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

<!--BACKPORT
[{"author":{"name":"Brittany","email":"seialkali@gmail.com"},"sourceCommit":{"committedDate":"2026-03-31T20:39:10Z","message":"[Search]
Replace aria-selected with aria-expanded on Result toggle button
(#260561)\n\n## Summary\n\n## Summary\n\nFixes a critical
`aria-allowed-attr` accessibility violation in the\n`Result` component
(`@kbn/search-index-documents`).\n\nThe \"Show more fields\"
`EuiButtonIcon` was using `aria-selected` to\ncommunicate its toggle
state, but `aria-selected` is not a valid ARIA\nattribute for the
`button` role. This was replaced with `aria-expanded`,\nwhich is the
semantically correct attribute for a button that controls\nthe
visibility of related
content.","sha":"70d4f496c01739c9ec4dbf2d82830d82e680b9fe","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Search","backport:all-open","v9.4.0"],"title":"[Search]
Replace aria-selected with aria-expanded on Result toggle
button","number":260561,"url":"https://github.com/elastic/kibana/pull/260561","mergeCommit":{"message":"[Search]
Replace aria-selected with aria-expanded on Result toggle button
(#260561)\n\n## Summary\n\n## Summary\n\nFixes a critical
`aria-allowed-attr` accessibility violation in the\n`Result` component
(`@kbn/search-index-documents`).\n\nThe \"Show more fields\"
`EuiButtonIcon` was using `aria-selected` to\ncommunicate its toggle
state, but `aria-selected` is not a valid ARIA\nattribute for the
`button` role. This was replaced with `aria-expanded`,\nwhich is the
semantically correct attribute for a button that controls\nthe
visibility of related
content.","sha":"70d4f496c01739c9ec4dbf2d82830d82e680b9fe"}},"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/260561","number":260561,"mergeCommit":{"message":"[Search]
Replace aria-selected with aria-expanded on Result toggle button
(#260561)\n\n## Summary\n\n## Summary\n\nFixes a critical
`aria-allowed-attr` accessibility violation in the\n`Result` component
(`@kbn/search-index-documents`).\n\nThe \"Show more fields\"
`EuiButtonIcon` was using `aria-selected` to\ncommunicate its toggle
state, but `aria-selected` is not a valid ARIA\nattribute for the
`button` role. This was replaced with `aria-expanded`,\nwhich is the
semantically correct attribute for a button that controls\nthe
visibility of related
content.","sha":"70d4f496c01739c9ec4dbf2d82830d82e680b9fe"}}]}]
BACKPORT-->

Co-authored-by: Brittany <seialkali@gmail.com>
kibanamachine added a commit that referenced this pull request Mar 31, 2026
…gle button (#260561) (#260580)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[Search] Replace aria-selected with aria-expanded on Result toggle
button (#260561)](#260561)

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

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

<!--BACKPORT
[{"author":{"name":"Brittany","email":"seialkali@gmail.com"},"sourceCommit":{"committedDate":"2026-03-31T20:39:10Z","message":"[Search]
Replace aria-selected with aria-expanded on Result toggle button
(#260561)\n\n## Summary\n\n## Summary\n\nFixes a critical
`aria-allowed-attr` accessibility violation in the\n`Result` component
(`@kbn/search-index-documents`).\n\nThe \"Show more fields\"
`EuiButtonIcon` was using `aria-selected` to\ncommunicate its toggle
state, but `aria-selected` is not a valid ARIA\nattribute for the
`button` role. This was replaced with `aria-expanded`,\nwhich is the
semantically correct attribute for a button that controls\nthe
visibility of related
content.","sha":"70d4f496c01739c9ec4dbf2d82830d82e680b9fe","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Search","backport:all-open","v9.4.0"],"title":"[Search]
Replace aria-selected with aria-expanded on Result toggle
button","number":260561,"url":"https://github.com/elastic/kibana/pull/260561","mergeCommit":{"message":"[Search]
Replace aria-selected with aria-expanded on Result toggle button
(#260561)\n\n## Summary\n\n## Summary\n\nFixes a critical
`aria-allowed-attr` accessibility violation in the\n`Result` component
(`@kbn/search-index-documents`).\n\nThe \"Show more fields\"
`EuiButtonIcon` was using `aria-selected` to\ncommunicate its toggle
state, but `aria-selected` is not a valid ARIA\nattribute for the
`button` role. This was replaced with `aria-expanded`,\nwhich is the
semantically correct attribute for a button that controls\nthe
visibility of related
content.","sha":"70d4f496c01739c9ec4dbf2d82830d82e680b9fe"}},"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/260561","number":260561,"mergeCommit":{"message":"[Search]
Replace aria-selected with aria-expanded on Result toggle button
(#260561)\n\n## Summary\n\n## Summary\n\nFixes a critical
`aria-allowed-attr` accessibility violation in the\n`Result` component
(`@kbn/search-index-documents`).\n\nThe \"Show more fields\"
`EuiButtonIcon` was using `aria-selected` to\ncommunicate its toggle
state, but `aria-selected` is not a valid ARIA\nattribute for the
`button` role. This was replaced with `aria-expanded`,\nwhich is the
semantically correct attribute for a button that controls\nthe
visibility of related
content.","sha":"70d4f496c01739c9ec4dbf2d82830d82e680b9fe"}}]}]
BACKPORT-->

Co-authored-by: Brittany <seialkali@gmail.com>
jeramysoucy pushed a commit to jeramysoucy/kibana that referenced this pull request Apr 1, 2026
…tton (elastic#260561)

## Summary

## Summary

Fixes a critical `aria-allowed-attr` accessibility violation in the
`Result` component (`@kbn/search-index-documents`).

The "Show more fields" `EuiButtonIcon` was using `aria-selected` to
communicate its toggle state, but `aria-selected` is not a valid ARIA
attribute for the `button` role. This was replaced with `aria-expanded`,
which is the semantically correct attribute for a button that controls
the visibility of related content.
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this pull request Apr 2, 2026
…tton (elastic#260561)

## Summary

## Summary

Fixes a critical `aria-allowed-attr` accessibility violation in the
`Result` component (`@kbn/search-index-documents`).

The "Show more fields" `EuiButtonIcon` was using `aria-selected` to
communicate its toggle state, but `aria-selected` is not a valid ARIA
attribute for the `button` role. This was replaced with `aria-expanded`,
which is the semantically correct attribute for a button that controls
the visibility of related content.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:all-open Backport to all branches that could still receive a release release_note:skip Skip the PR/issue when compiling release notes Team:Search v9.2.8 v9.3.3 v9.4.0

Projects

None yet

4 participants