When the delete button is clicked, we want to display a popup asking the user to confirm if they want to delete the article. We do this with a confirmation, which is just an alert with pre-built “Yes” and “No” buttons.

Update your delete_article_button_click function to look like this:

  def delete_article_button_click(self, **event_args):
    # Check that the user does want to delete the selected article
    confirm("Are you sure you want to delete {}?".format(self.item['title']))

This will display a confirmation popup with the article’s title, asking the user if they want to delete the article.