From debc873b26b2e3addd8f7627feaa6b4887606299 Mon Sep 17 00:00:00 2001 From: you Date: Sat, 21 Mar 2026 08:06:37 +0000 Subject: [PATCH] fix: BYOP button accessibility compliance - Add aria-label and aria-haspopup='dialog' to BYOP trigger button - Add aria-label to close button and textarea - Add role='status' and aria-live='polite' to result container - Add role='alert' to error messages for screen reader announcement - Fix textarea focus style: visible outline instead of outline:none - Update cache busters --- public/index.html | 4 ++-- public/packets.js | 12 ++++++------ public/style.css | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/index.html b/public/index.html index 6a03ad5d..5757f9e4 100644 --- a/public/index.html +++ b/public/index.html @@ -22,7 +22,7 @@ - + - + diff --git a/public/packets.js b/public/packets.js index ec0cff0d..80b515c5 100644 --- a/public/packets.js +++ b/public/packets.js @@ -370,7 +370,7 @@

Latest Packets (${totalCount})

- +
@@ -1066,11 +1066,11 @@ const overlay = document.createElement('div'); overlay.className = 'modal-overlay'; overlay.innerHTML = ''; document.body.appendChild(overlay); @@ -1113,7 +1113,7 @@ const hex = textarea.value.trim().replace(/[\s\n]/g, ''); const result = document.getElementById('byopResult'); if (!hex) { result.innerHTML = '

Enter hex data

'; return; } - if (!/^[0-9a-fA-F]+$/.test(hex)) { result.innerHTML = '

Invalid hex — only 0-9 and A-F allowed

'; return; } + if (!/^[0-9a-fA-F]+$/.test(hex)) { result.innerHTML = ''; return; } result.innerHTML = '

Decoding...

'; try { const res = await fetch('/api/decode', { @@ -1124,7 +1124,7 @@ if (data.error) throw new Error(data.error); result.innerHTML = renderDecodedPacket(data.decoded, hex); } catch (e) { - result.innerHTML = '

❌ ' + e.message + '

'; + result.innerHTML = ''; } } } diff --git a/public/style.css b/public/style.css index 2e4baa4d..ad6a23e1 100644 --- a/public/style.css +++ b/public/style.css @@ -919,7 +919,7 @@ button.ch-item.selected { background: var(--selected-bg); } border: 1px solid var(--border); border-radius: 6px; background: var(--surface-1); color: var(--text); } -.byop-input:focus { border-color: var(--accent); outline: none; } +.byop-input:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; } .byop-err { color: #ef4444; font-size: .85rem; } .byop-decoded { margin-top: 8px; } .byop-section { margin-bottom: 14px; }