Show keyboard shortcuts on presenter controls
CI / Deploy / test (push) Successful in 47s
CI / Deploy / deploy (push) Skipped

Tooltips are useless while presenting, so the controls now show their
shortcut as [V], [H], [F] and [Q]; the QR overlay hints at [Esc].
Labels of dynamic buttons live in a [data-label] span so the hint
survives updates. Shortcuts are exposed via aria-keyshortcuts and hidden
on touch-only devices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Opus 5.5 committed 2026-11-07 14:45:34 +01:00
1 parent 50010484be
commit 0ca36b8ec6
4 files changed
+32 -8

No files matched your search

+19 -6
View File
@@ -26,8 +26,9 @@ $host = preg_replace('#^https?://#', '', $joinBaseUrl);
<?= __('Mitmachen auf') ?> <strong><?= h($host) ?></strong>
<?= __('mit Code') ?> <strong class="stage__code"><?= h($poll->formattedJoinCode()) ?></strong>
</div>
<button type="button" class="stage__qr" data-qr-toggle title="<?= __('QR-Code vergrößern (Q)') ?>">
<button type="button" class="stage__qr" data-qr-toggle aria-keyshortcuts="Q" title="<?= __('QR-Code vergrößern (Q)') ?>">
<img src="<?= $this->Url->build(['_name' => 'admin:qr', 'token' => $adminToken]) ?>" alt="<?= __('QR-Code') ?>">
<kbd class="ctrl__key" aria-hidden="true">[Q]</kbd>
</button>
</header>
@@ -40,17 +41,29 @@ $host = preg_replace('#^https?://#', '', $joinBaseUrl);
<footer class="stage__controls">
<a class="ctrl" href="<?= $this->Url->build(['_name' => 'admin', 'token' => $adminToken]) ?>" title="<?= __('Zur Verwaltung') ?>">✎</a>
<button type="button" class="ctrl" data-action="prev" title="<?= __('Vorherige Folie (←)') ?>">←</button>
<button type="button" class="ctrl" data-action="prev" aria-keyshortcuts="ArrowLeft PageUp" title="<?= __('Vorherige Folie (←)') ?>">
<span aria-hidden="true">←</span><span class="sr-only"><?= __('Vorherige Folie') ?></span>
</button>
<span class="ctrl-counter" data-counter>–</span>
<button type="button" class="ctrl" data-action="next" title="<?= __('Nächste Folie (→)') ?>">→</button>
<button type="button" class="ctrl ctrl--wide" data-action="toggle" data-voting title="<?= __('Abstimmung öffnen/schließen (V)') ?>"></button>
<button type="button" class="ctrl ctrl--wide" data-hide-results title="<?= __('Ergebnisse ein-/ausblenden (H)') ?>"><?= __('Ergebnisse verbergen') ?></button>
<button type="button" class="ctrl" data-action="next" aria-keyshortcuts="ArrowRight PageDown Space" title="<?= __('Nächste Folie (→ oder Leertaste)') ?>">
<span aria-hidden="true">→</span><span class="sr-only"><?= __('Nächste Folie') ?></span>
</button>
<button type="button" class="ctrl ctrl--wide" data-action="toggle" data-voting aria-keyshortcuts="V" title="<?= __('Abstimmung öffnen/schließen (V)') ?>">
<span data-label></span> <kbd class="ctrl__key" aria-hidden="true">[V]</kbd>
</button>
<button type="button" class="ctrl ctrl--wide" data-hide-results aria-keyshortcuts="H" title="<?= __('Ergebnisse ein-/ausblenden (H)') ?>">
<span data-label><?= __('Ergebnisse verbergen') ?></span> <kbd class="ctrl__key" aria-hidden="true">[H]</kbd>
</button>
<span class="ctrl-counter" data-participants></span>
<button type="button" class="ctrl" data-fullscreen title="<?= __('Vollbild (F)') ?>">⛶</button>
<button type="button" class="ctrl" data-fullscreen aria-keyshortcuts="F" title="<?= __('Vollbild (F)') ?>">
<span aria-hidden="true">⛶</span><span class="sr-only"><?= __('Vollbild') ?></span>
<kbd class="ctrl__key" aria-hidden="true">[F]</kbd>
</button>
</footer>
<div class="qr-overlay" data-qr-overlay hidden>
<img src="<?= $this->Url->build(['_name' => 'admin:qr', 'token' => $adminToken]) ?>" alt="<?= __('QR-Code') ?>">
<p><?= h($joinUrl) ?></p>
<p class="qr-overlay__hint"><kbd class="ctrl__key">[Esc]</kbd> <?= __('oder Klick zum Schließen') ?></p>
</div>
</div>