Skip to content
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

fix(popover/help/helpinfo): help button contains two button, it desactivate the default onKeyPress #1103

Merged

Conversation

GuillaumeKESTEMAN
Copy link
Contributor

@GuillaumeKESTEMAN GuillaumeKESTEMAN commented Jan 10, 2024

Related issue

#1080

Description of the issue

I removed the second button to improve accessibility.
It wasn't blocking the onKeyPress but the condition which required your cursor to be over the button to use the onKeyPress.

I changed a little bit the UX :

Before :

Activated when :
- button click / button hover
- button hover + button focus+ press any key

Deactivated when :
- button click / no button hover
- click away from button
- button hover+ button focus+ press any key
- lose button focus

Now :

Activated when :
- button click / button hover
- button focus + press "Enter" key

Deactivated when :
- button click / no button hover
- click away from button
- button focus + press "Enter" key
- lose button focus

I had role="button" on PopoverOver wrapper to be focusable.

I've made a few styling changes, so if you have any questions/suggestions about this don't hesitate.

Person(s) for reviewing proposed changes

@samuel-gomez @MartinWeb

Important

Before creating a pull request run unit tests

$ npm test

# watch for changes
$ npm test -- --watch

# For a specific file (e.g., in packages/context/__tests__/command.test.js)
$ npm test -- --watch packages/action

@MartinWeb MartinWeb merged commit f9f0341 into AxaFrance:master Jan 16, 2024
3 checks passed
@MartinWeb MartinWeb added this to the v2.3.0 milestone Jan 24, 2024
@GuillaumeKESTEMAN GuillaumeKESTEMAN deleted the fix/help-button-key-press branch January 31, 2024 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants