Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Module Ot_form

module Ot_form : sig..end

An HTML element which can be selected by pressing the tab key


class type tabbable = object..end

An HTML element which can be selected by pressing the tab key

val setup_tabcycle : #tabbable Js.t list -> unit

setup_tabcycle makes tab key loop over child elements of an element and only these elements.

val setup_tabcycle_auto : Dom_html.element Js.t -> unit

setup_tabcycle_auto scans an element for tabbable elements (buttons, inputs) and feeds them to setup_tabcycle

val setup_form : Dom_html.element Js.t -> unit

Scan for focusable elements apply setup_tabcycle_auto to them and focus the first.

val prevent_tab : Dom_html.element Js.t -> unit -> unit

prevent_tab e prevents e (and its children) to be focused with tab key. A function to restore the initial status is returned.