Make an HTML element non-focusable

前端 未结 8 2316
误落风尘
误落风尘 2020-12-02 16:40

Is it possible to make an HTML element non-focusable?

I understand that a list of elements that can receive focus can be defined and that a user can

8条回答
  •  悲哀的现实
    2020-12-02 17:00

    To completely prevent focus, not just when using the tab button, set disabled as an attribute in your HTML element.

    
    
     Click this, you can see it's focusable.
    
      Click this, you can see it's focusable.
    
      Click this, you can see it's focusable. Not tab'able.
    
      Click this, you can see it's not focusable.

提交回复
热议问题