Tabbing to off canvas elements

ⅰ亾dé卋堺 提交于 2021-02-11 16:36:48

问题


I'm creating a slide in menu -w hen not on display the panel is hidden off canvas. However, I've noticed that when using the TAB key, elements not visible at the time get focus bringing the off-canvas panel into view.

Any ideas as to how to deal with this?


回答1:


If you are using html5 you can add tabindex='-1' to disable getting focus by tabs.

Of course if necessary you can always re-enable them when the panel is viewable.



来源:https://stackoverflow.com/questions/27963797/tabbing-to-off-canvas-elements

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!