You're given some existing HTML for a Todo List app. Add the following functionality to the app:
<input> field should be cleared upon successful addition.ids, data attributes, replacing some tags, etc), but the result should remain the same visually.This is an improved version of the basic solution.
Some of the improvements:
<form> to capture submission of new tasks. This will handle both Enter keys and "Submit" button clicks.<input>s should be labelled either via <label>s or aria-label attributes. Since the original markup doesn't contain a <label>, we can add aria-label to the <input>.aria-live region can be added to inform about the newly-added task. There is unlikely enough time to do this during an interview but you will get bonus points for mentioning it. Read more about ARIA live regions on MDN.<script>, <style> or <link>) and ensure there's no XSS.<input> is cleared after a task is added.<!doctype html><html lang="en"><head><meta charset="UTF-8" /><metaname="viewport"content="width=device-width, initial-scale=1.0" /></head><body><div id="root"></div></body></html>
console.log() statements will appear here.