fix: enhance button accessibility and clean up script tags

Replaced button element with a hyperlink to improve accessibility, ensuring better navigation for screen readers and users. Also, formatted the inline script for clarity and consistency. These changes contribute to a more user-friendly interface and maintain clean, readable code.
This commit is contained in:
Kumi 2024-08-08 09:23:37 +02:00
parent 3a32bb2fd5
commit 959c9f86cf
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -105,7 +105,7 @@ $xmr_in_fiat = strtr($xmr_in_fiat, ",", " ");
foreach ($chunks as $chunk) { foreach ($chunks as $chunk) {
echo "<tr>"; echo "<tr>";
foreach ($chunk as $currency) { foreach ($chunk as $currency) {
echo "<td><button type=\"button\" class=\"btn btn-light\" title=\"<a class='text-decoration-none fiat-tooltip' href='/?in={$currency}'><b>{$currency}</b></a>\" data-toggle=\"tooltip\" data-bs-html=\"true\" data-placement=\"top\">{$currency}</button></td>"; echo "<td><a href=\"/?in={$currency}\" class=\"btn btn-light\" data-toggle=\"tooltip\" data-bs-html=\"true\" data-placement=\"top\">{$currency}</a></td>";
} }
echo "</tr>"; echo "</tr>";
echo "<tr style=\"display:none;\">"; echo "<tr style=\"display:none;\">";
@ -159,7 +159,9 @@ $xmr_in_fiat = strtr($xmr_in_fiat, ",", " ");
</div> </div>
</div> </div>
<script>const exchangeRates = <?php echo json_encode($exchangeRates); ?>;</script> <script>
const exchangeRates = <?php echo json_encode($exchangeRates); ?>;
</script>
<script src="js/main.js"></script> <script src="js/main.js"></script>
</body> </body>