mirror of
https://github.com/screentinker/screentinker.git
synced 2026-05-15 07:32:23 -06:00
QA fixes: toast aria-live + scope playlist flex-wrap to mobile
- Toast now announces via role="status"/aria-live="polite" by default, and role="alert"/aria-live="assertive" for errors. Screen readers previously got nothing when notifications appeared. - Move playlist-item flex-wrap:wrap from inline style into the @media (max-width: 768px) block so desktop rows don't wrap controls when the viewport is intermediate-narrow. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
8cd5dd518a
commit
0bd34544e5
|
|
@ -937,6 +937,7 @@ body {
|
|||
-webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
|
||||
}
|
||||
.tab { white-space: nowrap; flex-shrink: 0; }
|
||||
.playlist-item { flex-wrap: wrap; }
|
||||
|
||||
/* Dashboard stats stack to single column */
|
||||
.dash-stats-row { flex-direction: column; }
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ export function showToast(message, type = 'info', duration = 4000) {
|
|||
const container = document.getElementById('toastContainer');
|
||||
const toast = document.createElement('div');
|
||||
toast.className = `toast ${type}`;
|
||||
toast.setAttribute('role', type === 'error' ? 'alert' : 'status');
|
||||
toast.setAttribute('aria-live', type === 'error' ? 'assertive' : 'polite');
|
||||
toast.innerHTML = `
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
${type === 'success' ? '<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/>' :
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ function renderItems(items) {
|
|||
}
|
||||
|
||||
itemsEl.innerHTML = items.map((item, i) => `
|
||||
<div class="playlist-item" data-item-id="${item.id}" data-index="${i}" draggable="true" style="background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:12px 16px;display:flex;align-items:center;gap:12px;cursor:grab;transition:border-color 0.15s;flex-wrap:wrap">
|
||||
<div class="playlist-item" data-item-id="${item.id}" data-index="${i}" draggable="true" style="background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:12px 16px;display:flex;align-items:center;gap:12px;cursor:grab;transition:border-color 0.15s">
|
||||
<div style="color:var(--text-muted);font-size:12px;min-width:24px;text-align:center;user-select:none">${i + 1}</div>
|
||||
<div style="width:48px;height:36px;border-radius:4px;overflow:hidden;background:var(--bg-input);flex-shrink:0;display:flex;align-items:center;justify-content:center">
|
||||
${item.thumbnail_path
|
||||
|
|
|
|||
Loading…
Reference in a new issue