Topic: MDB 8 - mdb-checkbox with tabindex=-1
When converting to mdb-checkbox tabindex=-1 stopped working and the checkbox returned to be a tab stop
<mdb-checkbox formControlName="cb1" tabindex=-1 (change)="onChange()">check</mdb-checkbox>
mdb2 pro answered 5 years ago
OK, let me rephrase
Tab skips the checkbox
Shift-Tab stops on the checkbox
P.S. [tabindex]="-1" didn't effect the behavior.
Damian Gemza staff answered 5 years ago
Dear @mdb2
There's no tabindex
input on mdb-checkbox
component.
There's a tabIndex
input which works fine - with setting the tabIndex="-1"
on mdb-checkbox
element, I'm not able to focus it through tab or shift+tab.
Best Regards,
Damian
Damian Gemza staff answered 5 years ago
Dear @mdb2
As I said in this answer, it's not. Because in mdb-checkbox
there's no tabindex
input.
There's a tabIndex
input. You have a typo in input name. Correct it and it should be working as expected.
Best Regards,
Damian
mdb2 pro answered 5 years ago
OK
There was indeed a typo in tabindex instead of tabIndex (lower case i)
It did solve the issue for mdb-checkbox so it DOES work on it, not only on input
PS. How do you style comp name "mdb-checkbox" with red letters and gray background here in the questions ?
Arkadiusz Idzikowski staff commented 5 years ago
You need to use backtick "`" before and after the text.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- User: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: 8.0.0
- Device: NA
- Browser: NA
- OS: NA
- Provided sample code: No
- Provided link: No
Arkadiusz Idzikowski staff commented 5 years ago
We can't reproduce this problem on our end. The checkbox with tabindex set to -1 is not focusable. Please try to add the bindings
[tabindex]="-1"
.