/src/main/java/org/htmlunit/html/HtmlPage.java
tabbableElements.sort( getTabbableElements( ) ) ;
tabbableElements.sort ( createTabOrderComparator ( ) ) ;
final boolean disabled = element.hasAttribute(ATTRIBUTE_DISABLED); if (!disabled && !HtmlElement.TAB_INDEX_OUT_OF_BOUNDS.equals(element.getTabIndex())) { tabbableElements.add(element); } } } <extra_id_0> return Collections.unmodifiableList(tabbableElements); } private static Comparator<HtmlElement> createTabOrderComparator() { return (element1, element2) -> { final Short i1 = element1.getTabIndex(); final Short i2 = element2.getTabIndex();