Skip to content

fix: [Stateful: Home page] Not checked radio button receive focus a first element in radio group.#195745

Merged
alexwizp merged 4 commits intoelastic:mainfrom
alexwizp:#195190
Oct 15, 2024
Merged

fix: [Stateful: Home page] Not checked radio button receive focus a first element in radio group.#195745
alexwizp merged 4 commits intoelastic:mainfrom
alexwizp:#195190

Conversation

@alexwizp
Copy link
Copy Markdown
Contributor

@alexwizp alexwizp commented Oct 10, 2024

Closes: #195190

Description

According to ARIA Authoring Practices Guide, focus should be on the checked radio button when the user reaches radio group while navigating using only keyboard. As of now, because all the time first radio button in the group receives focus, even if it is not checked, it may cause confusion and could potentially lead users to unintentionally change their selection without checking all checkboxes which exist in the group.

What was changed:

  1. Added name attribute for EuiRadioGroup.

Screen:

Screen.Recording.2024-10-10.at.14.10.30.mov

@alexwizp alexwizp marked this pull request as ready for review October 10, 2024 11:11
@alexwizp alexwizp requested a review from a team as a code owner October 10, 2024 11:11
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-accessibility (Project:Accessibility)

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
enterpriseSearch 2.6MB 2.6MB +36.0B

History

Copy link
Copy Markdown
Member

@efegurkan efegurkan left a comment

Choose a reason for hiding this comment

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

LGTM.

Thank you

@alexwizp alexwizp merged commit 2c1d5ce into elastic:main Oct 15, 2024
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 15, 2024
…irst element in radio group. (elastic#195745)

Closes: elastic#195190

## Description

According to ARIA Authoring Practices Guide, focus should be on the
checked radio button when the user reaches radio group while navigating
using only keyboard. As of now, because all the time first radio button
in the group receives focus, even if it is not checked, it may cause
confusion and could potentially lead users to unintentionally change
their selection without checking all checkboxes which exist in the
group.

## What was changed:
1. Added name attribute for `EuiRadioGroup`.

## Screen:

https://github.com/user-attachments/assets/20db2394-b9db-4c40-9e72-53ee860cd066
(cherry picked from commit 2c1d5ce)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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 Oct 15, 2024
…us a first element in radio group. (#195745) (#196273)

# Backport

This will backport the following commits from `main` to `8.x`:
- [fix: [Stateful: Home page] Not checked radio button receive focus a
first element in radio group.
(#195745)](#195745)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Alexey
Antonov","email":"alexwizp@gmail.com"},"sourceCommit":{"committedDate":"2024-10-15T10:33:30Z","message":"fix:
[Stateful: Home page] Not checked radio button receive focus a first
element in radio group. (#195745)\n\nCloses: #195190\r\n\r\n##
Description \r\n\r\nAccording to ARIA Authoring Practices Guide, focus
should be on the\r\nchecked radio button when the user reaches radio
group while navigating\r\nusing only keyboard. As of now, because all
the time first radio button\r\nin the group receives focus, even if it
is not checked, it may cause\r\nconfusion and could potentially lead
users to unintentionally change\r\ntheir selection without checking all
checkboxes which exist in the\r\ngroup.\r\n\r\n## What was changed:
\r\n1. Added name attribute for `EuiRadioGroup`. \r\n\r\n## Screen:
\r\n\r\n\r\nhttps://github.com/user-attachments/assets/20db2394-b9db-4c40-9e72-53ee860cd066","sha":"2c1d5ce08fa55275148e61012aa49061f01c3dd9","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Project:Accessibility","release_note:skip","v9.0.0","Team:Search","backport:prev-minor"],"title":"fix:
[Stateful: Home page] Not checked radio button receive focus a first
element in radio
group.","number":195745,"url":"https://github.com/elastic/kibana/pull/195745","mergeCommit":{"message":"fix:
[Stateful: Home page] Not checked radio button receive focus a first
element in radio group. (#195745)\n\nCloses: #195190\r\n\r\n##
Description \r\n\r\nAccording to ARIA Authoring Practices Guide, focus
should be on the\r\nchecked radio button when the user reaches radio
group while navigating\r\nusing only keyboard. As of now, because all
the time first radio button\r\nin the group receives focus, even if it
is not checked, it may cause\r\nconfusion and could potentially lead
users to unintentionally change\r\ntheir selection without checking all
checkboxes which exist in the\r\ngroup.\r\n\r\n## What was changed:
\r\n1. Added name attribute for `EuiRadioGroup`. \r\n\r\n## Screen:
\r\n\r\n\r\nhttps://github.com/user-attachments/assets/20db2394-b9db-4c40-9e72-53ee860cd066","sha":"2c1d5ce08fa55275148e61012aa49061f01c3dd9"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195745","number":195745,"mergeCommit":{"message":"fix:
[Stateful: Home page] Not checked radio button receive focus a first
element in radio group. (#195745)\n\nCloses: #195190\r\n\r\n##
Description \r\n\r\nAccording to ARIA Authoring Practices Guide, focus
should be on the\r\nchecked radio button when the user reaches radio
group while navigating\r\nusing only keyboard. As of now, because all
the time first radio button\r\nin the group receives focus, even if it
is not checked, it may cause\r\nconfusion and could potentially lead
users to unintentionally change\r\ntheir selection without checking all
checkboxes which exist in the\r\ngroup.\r\n\r\n## What was changed:
\r\n1. Added name attribute for `EuiRadioGroup`. \r\n\r\n## Screen:
\r\n\r\n\r\nhttps://github.com/user-attachments/assets/20db2394-b9db-4c40-9e72-53ee860cd066","sha":"2c1d5ce08fa55275148e61012aa49061f01c3dd9"}}]}]
BACKPORT-->

Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Stateful: Home page] Not checked radio button receive focus as first element in radio group.

4 participants