According to the window_handles
documentation:
window_handles
Returns the handles of all windows within the current session.<
Only the top level browser window has an HWND. Tabs don't have their own HWNDs. For more clarification refer here.
Selenium have a Handle for Windows not for tabs. you can also work on the tabs with some code like this
ArrayList<String> tabs2 = new ArrayList<String> (driver.getWindowHandles());
driver.switchTo().window(tabs2.get(0));
this will allow you to work on Tab 1 and
driver.switchTo().window(tabs2.get(1));
will allow you to work on the second tab.By this way you can handle tab in Browser.