H
H
Happymalina2016-03-30 15:32:43
Google Chrome
Happymalina, 2016-03-30 15:32:43

Why does the mobile menu open on the site when I press the tab button in chrome?

People, tell me what it could be - I go to the site in chrome and when I press TAB on the right, the mobile menu is shown? and how to fix it??

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Bogachev, 2016-04-08
@sfi0zy

In Chrome (and not only in Chrome - in most modern browsers), the tab button allows you to navigate through elements that you can interact with - links, buttons, etc. The active element is highlighted/underlined/outlined. When laying out pages, this selection is often removed. As a result: if your mobile menu is initially hidden, but in the html code itself is at the beginning of body, then when you press tab, the focus moves to the first link in your mobile menu - and it is shown. And since there is no selection, it is not obvious what exactly was revealed and why. And about how to fix it - you can use tabindex equal to -1. It 's written about it here.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question