You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not able to disable tabbing to a md-checkbox.
What is the expected behavior?
<md-checkbox tabIndex="-1"></md-checkbox> should not be skipped over when tabbing through a form.
What is the current behavior?
The checkbox receives focus when tabbing through the form. In addition, there isn't any visual indication that the checkbox has focus, so it's difficult to tell where I am in the form unless I press the spacebar to toggle that particular entry.
@devversion So I just came back to this and see that it does indeed work with the camelcase tabIndex. Is that the plan to keep it like that? I'm glad that it works, but given that the spec for tabindex is all lowercase, I wonder if that will cause additional confusion (beyond just myself).
Not sure. I see that it can cause confusion here, but I think the tabIndex is in camel-cause because when using an input binding, you are actually setting the native tabIndex property.
Activity
devversion commentedon Mar 1, 2017
You mentioned in the issue that you are using
tabIndexin camelcase. But in your Plunkr it's actually justtabindex.For those components, just using
tabIndexin camelcase should do the trick.http://plnkr.co/edit/4ScdvxMz8q2Q5RC6bILh?p=preview
[-]tabindex doesn't work on mdInput[/-][+]tabindex doesn't work on md-checkbox[/+]jloosli commentedon Mar 1, 2017
Whoops..I had the wrong title down...it's actually md-checkbox that tabindex doesn't work. I also corrected the example to have a lowercase tabindex
crisbeto commentedon Mar 2, 2017
WRT to the focus indication, it is being tracked via #3102.
jloosli commentedon Mar 3, 2017
@devversion So I just came back to this and see that it does indeed work with the camelcase tabIndex. Is that the plan to keep it like that? I'm glad that it works, but given that the spec for tabindex is all lowercase, I wonder if that will cause additional confusion (beyond just myself).
devversion commentedon Mar 5, 2017
Not sure. I see that it can cause confusion here, but I think the
tabIndexis in camel-cause because when using an input binding, you are actually setting the nativetabIndexproperty.That's why for native inputs you can also do
Not sure if we should support both.
jelbourn commentedon Apr 12, 2017
@tinayuangao are you able to confirm if this is an issue?
tinayuangao commentedon Apr 13, 2017
It's fixed by #3403. Now checkbox has focus indicator and
[tabIndex]="-1"works.angular-automatic-lock-bot commentedon Sep 5, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.