diff --git a/__snapshots__/src/tag/index.test.js.md b/__snapshots__/src/tag/index.test.js.md
index 4cba7e93..f368d636 100644
--- a/__snapshots__/src/tag/index.test.js.md
+++ b/__snapshots__/src/tag/index.test.js.md
@@ -11,14 +11,14 @@ Generated by [AVA](https://ava.li).
hello
return (
- {getTags(tags, onTagRemove, readOnly, disabled, texts.labelRemove)}
+ {getTags(tags, onTagRemove, readOnly, disabled, texts.labelRemove, clientId)}
- {lastItem}
)
diff --git a/src/tree-manager/keyboardNavigation.js b/src/tree-manager/keyboardNavigation.js
index a41d9c2d..14b0c734 100644
--- a/src/tree-manager/keyboardNavigation.js
+++ b/src/tree-manager/keyboardNavigation.js
@@ -144,14 +144,14 @@ const getNextFocus = (tree, prevFocus, action, getNodeById, markSubTreeOnNonExpa
return getRelativeFocus(nodes, prevFocus, action)
}
-const getNextFocusAfterTagDelete = (deletedId, prevTags, tags, fallback) => {
+const getNextFocusAfterTagDelete = ({ id, prevTags, tags, fallback, clientId }) => {
// Sets new focus to next tag or returns fallback
- let index = prevTags && prevTags.findIndex(t => t._id === deletedId)
+ let index = prevTags && prevTags.findIndex(t => t._id === id)
if (index < 0 || !tags.length) return fallback
index = tags.length > index ? index : tags.length - 1
const newFocusId = tags[index]._id
- const focusNode = document.getElementById(getTagId(newFocusId))
+ const focusNode = document.getElementById(getTagId({ clientId, id: newFocusId }))
if (focusNode) {
return focusNode.firstElementChild || fallback
}
diff --git a/src/trigger/index.js b/src/trigger/index.js
index ddead5c6..eb62e9f4 100644
--- a/src/trigger/index.js
+++ b/src/trigger/index.js
@@ -28,7 +28,7 @@ class Trigger extends PureComponent {
labelledBy.push(triggerId)
}
tags.forEach(t => {
- labelledBy.push(getTagId(t._id))
+ labelledBy.push(getTagId({ clientId, id: t._id }))
})
labelAttributes = getAriaLabel(texts.label, labelledBy.join(' '))
}