-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
front: fix combobox behavior #10168
front: fix combobox behavior #10168
Conversation
- when clicked in the combox scroll bar, the focus shifted to the view's main div Co-authored-by: nncluzu <[email protected]> Signed-off-by: Uriel-Sautron <[email protected]>
@@ -181,7 +181,8 @@ const StdcmView = () => { | |||
if (error && error.message !== NO_CONFIG_FOUND_MSG) throw error; | |||
|
|||
return ( | |||
<div role="button" tabIndex={0} className="stdcm" onClick={() => setShowStatusBanner(false)}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this has accessibility consequences: it's no longer possible to activate the button via the keyboard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, but it's not really a button since it wraps the whole STDCM view… I think we should drop role="button"
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interacting with this div just removes the simulation banner. Do we need to activate it on the keyboard?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The container doesn't act like a button, so I don't think role="button"
is appropriate here.
There are many ways to "interact" with a form, using the mouse to do so is just one of them. For instance, the Tab key focuses the next form element, or the "Next" key on an on-screen keyboard (e.g. on an Android tablet) has the same effect.
Maybe onFocus
is what we want here instead of onClick
?
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #10168 +/- ##
==========================================
- Coverage 79.96% 79.95% -0.01%
==========================================
Files 1057 1057
Lines 106335 106336 +1
Branches 724 724
==========================================
- Hits 85028 85024 -4
- Misses 21265 21270 +5
Partials 42 42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Not relevant anymore, since the bug was solved by #10293 |
close #8932