Use attr() instead of data() so the item ids work as intended

Fix #8841