Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

Commit

Permalink
Use form element for better accessibility
Browse files Browse the repository at this point in the history
This identifies the inputs and connect button as a proper HTML form with a form submit button, which enables a user to press the  key to submit the form.
  • Loading branch information
joshmcrty committed Jul 23, 2017
1 parent ff177fe commit c16751b
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/connect.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,22 @@
<body>
<div id="titlebar"></div>
<h2>Connect to Home Assistant</h2>
<div class="container">
<input id="url-input" value="http://localhost:8123" placeholder="URL"><br>
<input id="password-input" value="" type="password" placeholder="Password (optional)">
<br>
<p class="warning">Warning! The password will be stored in plaintext on your computer!</p>
</div>
<div class="container">
<div>
<button onclick="connect()">Connect</button>
<form onsubmit="connect()">
<div class="container">
<input id="url-input" value="http://localhost:8123" placeholder="URL"><br>
<input id="password-input" value="" type="password" placeholder="Password (optional)">
<br>
<p class="warning">Warning! The password will be stored in plaintext on your computer!</p>
</div>
<div id="status">
<div class="container">
<div>
<button type="submit">Connect</button>
</div>
<div id="status">

</div>
</div>
</div>
</form>
</body>

</html>

0 comments on commit c16751b

Please sign in to comment.