From 970cbcae5dbd61d22809ea088a558ec4f5110531 Mon Sep 17 00:00:00 2001
From: Conrad Zelck <git@simpel.cc>
Date: Sat, 7 Oct 2023 01:57:02 +0200
Subject: [PATCH] fix: repair invalid label with p

The label refered to a textarea before. This was replaced with a div.
A div can't be reference by a label. Some make it a p and set for a11y
aria-labelledby onto #input and #output.

Signed-off-by: Conrad Zelck <git@simpel.cc>
---
 index.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/index.php b/index.php
index 3b48112..d6c428b 100644
--- a/index.php
+++ b/index.php
@@ -206,13 +206,13 @@
       <div class="two-column">
         <div class="left">
           <div class="flex-space-between">
-            <label for="input" id="label-inputfield" class="labelLikeHeading">Input field</label>
+            <p id="label-inputfield" class="label">Input field</p>
             <button type="button" disabled id="convert" name="convert" title="Convert input.
 You can use this shortcut:
 OSX: [ Ctrl ] + [ Opt ] + [ p ]
 WIN: [ Alt ] + [ p ]" accesskey="p" onclick="pandoc(true)">Convert [p]</button>
           </div>
-          <div id="input" role="textbox" aria-multiline="true" contenteditable="true"></div>
+          <div id="input" role="textbox" aria-multiline="true" aria-labelledby="label-inputfield" contenteditable="true"></div>
         </div>
         <div class="right">
           <div class="flex-space-between">
@@ -222,7 +222,7 @@ You can use this shortcut:
 OSX: [ Ctrl ] + [ Opt ] + [ c ]
 WIN: [ Alt ] + [ c ]" accesskey="c" onclick="copyOutput()">Copy output field [c]</button>
           </div>
-          <div id="output"></div>
+          <div id="output" aria-labelledby="label-outputfield"></div>
         </div>
       </div>
     </div>
-- 
GitLab