Can you use the <label> tags for the keyboard in Safari / Chrome / old Firefox?

In HTML, if you want to make arbitrary elements from the keyboard, you can add the tabindex="0" attribute to them (for example, http://snook.ca/archives/accessibility_and_usability/elements_focusable_with_tabindex ).

The HTML5 specification specification ratifies this, making the tabindex attribute legal for any element:

However, as far as I can tell, this does not work for <label> elements in Chrome and Safari, or Firefox before 3.6 (and there it stops the user from navigating through the page after they reach <label> ).

Is there a way to make a <label> keyboard to focus in Safari / Chrome and / or older versions of Firefox?

+4
source share
1 answer

I think the whole purpose of a tag tag is to set focus on other elements, not on itself.

+1
source

Source: https://habr.com/ru/post/1402712/


All Articles