Currently, a tool in a toolbar can be of type button (ButtonWidget), toggle (ToggleButtonWidget), or select (custom picklist). This limits what can be added to a toolbar, for example it is not possible to add a ButtonGroupWidget for a button with context menu (as is needed for T285712), or a ComboBoxWidget for entering custom data.
To fix this, it is proposed to add a new type: 'element' value and element={string|jQuery|HTMLElement} key, with which to add arbitrary HTML as toolbar items. The element would still get a wrapper such as <div class="tool">…</div>.