private Element getKeyboardSelectedElement(TableCellElement td) {
        if (td == null) {
            return null;
        }

        /*
         * The TD itself is a cell parent, which means its internal structure
         * (including the tabIndex that we set) could be modified by its Cell. We
         * return the TD to be safe.
         */
        if (tableBuilder.isColumn(td)) {
            return td;
        }

        /*
         * The default table builder adds a focusable div to the table cell because
         * TDs aren't focusable in all browsers. If the user defines a custom table
         * builder with a different structure, we must assume the keyboard selected
         * element is the TD itself.
         */
        Element firstChild = td.getFirstChildElement();
        if (firstChild != null && td.getChildCount() == 1
            && "div".equalsIgnoreCase(firstChild.getTagName())) {
            return firstChild;
        }

        return td;
    }
Get the keyboard selected element from the selected table cell.

@return the keyboard selected element, or null if there is none
stroom-core-client-widget/src/main/java/com/google/gwt/user/cellview/client/AbstractCellTable.java