Check for both focusable and focused states when determining text block elements

Some widgets, such as the Dojo combo box list, lack state focusable even
when focused. This check is a safe-enough workaround.