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

[Outreachy Task Submission] Remove Extra Focus From Add Buttons On Keyboard Navigation #4902

Open
Aquilaafuadajo opened this issue Mar 29, 2024 · 2 comments · May be fixed by ushahidi/platform-client-mzima#982

Comments

@Aquilaafuadajo
Copy link

Description
Currently the add new buttons behave weirdly when navigating using just keyboard. The button has to be tabbed twice before it responds to the enter event.

Why does this happen?
This happens because the mizima-client-buttons in this cases are router links and router links come with their own focus when tabbed into, so this focus + the buttons default focus results in tabbing twice before the button responds to the enter event.

Fix
Set tabindex to -1 on mizima-client-buttons when it's being used as a router link to prevent this extra focus.

@MugoBrian
Copy link

Hello @Aquilaafuadajo . Could you include steps to reproduce this issue? I would love to check out the issue if it's similar to the one I found.

@MugoBrian
Copy link

No need I have seen the steps in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants