From 0144f1bc787057879ba09d685002499d05443962 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 1 Oct 2025 15:48:12 +0000 Subject: [PATCH 1/3] Initial plan From 7c9629a5ce53e75016573e66a3d0be804f60b87d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 1 Oct 2025 15:54:03 +0000 Subject: [PATCH 2/3] Fix WAVE accessibility errors for local videos Co-authored-by: skerbis <791247+skerbis@users.noreply.github.com> --- lib/video.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/video.php b/lib/video.php index ad14990..dcc3412 100644 --- a/lib/video.php +++ b/lib/video.php @@ -382,6 +382,9 @@ public function generate(): string // Never set src attribute for YouTube/Vimeo - this should be done by JavaScript after consent } else { $code .= " src=\"" . rex_escape($sourceUrl) . "\""; + // Add aria-label for local videos/audio to ensure proper accessibility + $ariaLabel = $this->title ?: $this->getText("a11y_{$mediaType}_player"); + $code .= " aria-label=\"" . rex_escape($ariaLabel) . "\""; } $code .= " crossorigin>"; @@ -389,7 +392,9 @@ public function generate(): string $code .= ""; if (!$isAudio && !empty($this->poster)) { - $code .= "poster['src']) . "\" alt=\"" . rex_escape($this->poster['alt']) . "\">"; + // Use title as fallback alt text if poster alt is empty for accessibility + $posterAlt = !empty($this->poster['alt']) ? $this->poster['alt'] : $this->title; + $code .= "poster['src']) . "\" alt=\"" . rex_escape($posterAlt) . "\">"; } if ($videoInfo['platform'] === 'default') { From 80814c96cf1df75cee7530a3d59270765be6b1c6 Mon Sep 17 00:00:00 2001 From: Thomas Skerbis Date: Fri, 10 Oct 2025 16:58:10 +0200 Subject: [PATCH 3/3] Update lib/video.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- lib/video.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/video.php b/lib/video.php index dcc3412..059cc9c 100644 --- a/lib/video.php +++ b/lib/video.php @@ -393,7 +393,7 @@ public function generate(): string if (!$isAudio && !empty($this->poster)) { // Use title as fallback alt text if poster alt is empty for accessibility - $posterAlt = !empty($this->poster['alt']) ? $this->poster['alt'] : $this->title; + $posterAlt = !empty($this->poster['alt']) ? $this->poster['alt'] : (!empty($this->title) ? $this->title : $this->getText('a11y_video_poster')); $code .= "poster['src']) . "\" alt=\"" . rex_escape($posterAlt) . "\">"; }