On our login page, we want to focus the first empty field to improve UX. If the username if blank, focus it. If the username is autofilled, then focus the password, if both filled, then focus the submit button, etc.
However, our jQuery ($("#username").val()) is always empty, even when the browser has autofilled the field. Totally understand for security reasons that there would be restrictions on being able to actually read the username and/or password that the browser has provided, however is there a way to determine if the fields have been filled or not?
We don't need to read the actual content of the field, just want to know if there is any content.
There doesn't appear to be any change in class or data or tags when we inspect in dev tools.
Any JavaScript/jQuery/CSS way to find this out?