diff options
| author | kj-sh604 | 2024-08-08 19:05:45 -0400 |
|---|---|---|
| committer | kj-sh604 | 2024-08-08 19:05:45 -0400 |
| commit | 05fbee343f2edf40d339ef75932372cf59de3d3c (patch) | |
| tree | 50ce03fc41352b1156d35400c87a0128844ef0ca | |
| parent | 12430221001cecb92fd1fb4fce7b3baf91d7ba01 (diff) | |
fix: accessibility
| -rw-r--r-- | index.php | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -77,15 +77,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['compile'])) { <br> <?php } else { ?> <div> - <h2 class="centered">markdown goes here:</h2> + <label for="user-input"> + <h2 class="centered">markdown goes here:</h2> + </label> <form action="index.php" method="post"> - <script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script> <textarea id="user-input" name="user-input" rows="8" cols="80"><?php echo $_SESSION['user-input'] ?? ''; ?></textarea> - <script type="text/javascript"> - var simplemde = new SimpleMDE({ - element: document.getElementById("user-input") - }); - </script> <div class="centered"> <button type="submit" name="compile">create presentation</button> </div> @@ -148,6 +144,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['compile'])) { return false; } </script> + <script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script> + <script type="text/javascript"> + var simplemde = new SimpleMDE({ + element: document.getElementById("user-input") + }); + </script> </body> - </html> |
