-
Notifications
You must be signed in to change notification settings - Fork 135
tabindex issue #72
Comments
I actually tried setting the button to have a tabindex of 2 and the anchor with |
@vipdorian I don't think the video's permissions are set to public. |
Ok, try this one https://youtu.be/AQdweW2cXGI
2017-04-24 22:53 GMT-04:00 Eugene Cheung <[email protected]>:
… @vipdorian <https://github.com/vipdorian> I don't think the video's
permissions are set to public.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#72 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJrNjCybd4Wak38KQssbzXA0zEfkWUNHks5rzWBGgaJpZM4NG5ag>
.
|
@vipdorian Thanks, the video works now. I can reproduce it on my end too, so I'll be looking into this in the coming days. |
This is actually pretty hard to reproduce consistently, but I did look over the code and made some small edits that should hopefully fix this. Feel free to reopen this if it's still happening in v4.2.2+. |
Hi, I think the problem is in sidebar.component.ts at around line 411. |
I don't think explicitely setting a tabindex is correct either. After all, elements don't have it normally anyway. |
Yeah you're right.
But, setting tabindex="-1" for elements which had no tabindex property is
worst. It means that elements which were tabable are not tabable anymore.
I think the solution would be : if the element did NOT have a tabindex
property, to not setting one when the sidenav is opened again.
2017-04-26 20:05 GMT-04:00 Eugene Cheung <[email protected]>:
… I don't think explicitely setting a tabindex is correct either. After all,
elements don't have it normally anyway.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#72 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJrNjFhvMGrNOZrUXqE80Vd2HyvNagU4ks5rz9vHgaJpZM4NG5ag>
.
|
That's intentionally done so that the elements aren't focusable when the sidebar is closed (and presumably out of the visible viewport). The current logic should already account for removing the tabindex if there was none initially. |
I have a collapsible menu inside of an ng-sidebar. When the parent items are closed I set tabindex to -1 for children:
The sidebar appears to completely blow away any custom tabindex I'm setting though. Is there any way to disable this behavior? Edit: It appears to be an issue with having the sidebar opened initially when the page loads. After looking at how this lib tracks tabindex I tried adding a small delay to when the sidebar opened flag is flipped to true (based on screen size) and this seems to have fixed the issue with the initial custom tabindex being lost. |
Yeah, it's because it removes any tabindex value assuming that it was previously set as -1 when closing the sidebar. I can probably throw together a workaround tonight. |
@k-schneider That issue should be fixed in v7.1.0. |
Thanks! But something funky is still happening if the user closes/opens the menu too quickly. The indexes are not being restored as expected. |
If there more than one element with tabindex >= 0, when the sidebar is opened a second time, tabindex is set to "-1" to all alements except first one.
To reproduce the bug,
5 If click again on "Opened", the tabindex will be at "-1" instead of 1.
The text was updated successfully, but these errors were encountered: