f focusNextIn(elt, parent)
			  set focusRing to (<a, button, input:not([type=hidden]), textarea, select, details/> in parent) as Array
			  set nextIndex to focusRing.indexOf(elt) + 1
			  set next to focusRing[nextIndex] or first of focusRing
			  call next.focus()
			end

			def focusPreviousIn(elt, parent)
			  set focusRing to (<a, button, input:not([type=hidden]), textarea, select, details/> in parent) as Array
			  set previousIndex to focusRing.indexOf(elt) - 1
			  set previous to focusRing[previou