This should be refactored into a separate function that is called here and in `_createNewListItem`. That way if the structure of this element ever changes, it only needs to be updated in one place.