Index: chrome/browser/ui/views/tabs/tab_strip.cc |
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc |
index e22c45709fd4e6b4064187737033379e62305ec0..8ca3342a37703a142424c62f8f150f7854bda14c 100644 |
--- a/chrome/browser/ui/views/tabs/tab_strip.cc |
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc |
@@ -1344,7 +1344,9 @@ int TabStrip::GetBackgroundResourceId(bool* custom_image) const { |
void TabStrip::UpdateTabAccessibilityState(const Tab* tab, |
ui::AXNodeData* node_data) { |
node_data->AddIntAttribute(ui::AX_ATTR_SET_SIZE, tab_count()); |
- node_data->AddIntAttribute(ui::AX_ATTR_POS_IN_SET, GetModelIndexOfTab(tab)); |
+ |
+ int pos_in_set = tab_count() ? GetModelIndexOfTab(tab) + 1 : 0; |
sky
2017/02/28 04:01:05
GetModelIndexOfTab may return -1 if tab is closing
David Tseng
2017/02/28 19:26:52
Added explicit check (which omits data if it is no
|
+ node_data->AddIntAttribute(ui::AX_ATTR_POS_IN_SET, pos_in_set); |
sky
2017/02/28 04:02:33
One more comment. Why do we need AX_ATTR_POS_IN_SE
David Tseng
2017/02/28 19:26:52
It's spec'ed as 1-based in the relevant W3C doc (A
|
} |
void TabStrip::MouseMovedOutOfHost() { |