For anchors with markup like the above, sometimes (depending on the CSS applied of course), the <a> element has a height/ width of 0 BUT its children have a valid height/ width. These links, though valid in a way, would not get selected by our code because we have a check against invisible elements.
To fix this issue of some valid main elements not getting selected, we've removed this check (HTML is messy! :/)
Fixed state of code:
When finding element based on the mainElement selector specified in urlData, we don't check for the element to be visible.
If mainElement selector is not specified, or if no element was found using the selector, then we find the first visible focusable in the CU, and give it focus.
For anchors with markup like the above, sometimes (depending on the CSS applied of course), the
<a>
element has a height/ width of 0 BUT its children have a valid height/ width. These links, though valid in a way, would not get selected by our code because we have a check against invisible elements.To fix this issue of some valid main elements not getting selected, we've removed this check (HTML is messy! :/)
Fixed state of code: