From 7dd92aaeb23ff83dd3d34c876b0e1ffc0f9c7962 Mon Sep 17 00:00:00 2001 From: ghassan Date: Wed, 21 Oct 2026 10:53:23 +0300 Subject: [PATCH] feat(a11y,admin): skip link, aria-labels, Ready label, title + age fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A11y: - Skip-to-content link lands first in the body and jumps to #main past the header + sidebar for keyboard users. - aria-label on the icon buttons that previously carried only an icon: hamburger menu (+ aria-controls="sidebar"), mobile search toggle, account menu (also drops the duplicate alt on the avatar since the button name already speaks the user's name). Admin: - Dashboard stat card renamed "Live Videos" → "Ready" (matches the DB status column; nothing on this card is actually live). Settings: - Duplicate "Prefer not to say" option on the Gender select — the empty placeholder shared the same label as the real option. Placeholder is now "Select…"; the real "Prefer not to say" option stays unchanged. - Birthday picker caps the Year dropdown at (this year − 13) and the server-side register validation requires the same, so a client bypass can't let a <13 user through. Titles: - Admin layout uses "{Page} | TAKEONE" to match the frontend format (was "{Page} — TAKEONE"). User pages that said "| TAKEONE" literal now interpolate config('app.name'). Shorts and Welcome moved from " - " to " | " separator. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../Controllers/Auth/RegisteredUserController.php | 6 +++++- resources/views/admin/dashboard.blade.php | 7 +++++-- resources/views/auth/register.blade.php | 5 ++++- resources/views/layouts/app.blade.php | 14 ++++++++++++++ resources/views/layouts/partials/header.blade.php | 13 +++++++------ resources/views/user/channel.blade.php | 8 +++++++- resources/views/user/history.blade.php | 2 +- resources/views/user/liked.blade.php | 2 +- resources/views/user/profile.blade.php | 2 +- resources/views/user/settings.blade.php | 2 +- resources/views/videos/shorts.blade.php | 2 +- resources/views/welcome.blade.php | 2 +- 12 files changed, 48 insertions(+), 17 deletions(-) diff --git a/app/Http/Controllers/Auth/RegisteredUserController.php b/app/Http/Controllers/Auth/RegisteredUserController.php index 327aa76..8195e66 100644 --- a/app/Http/Controllers/Auth/RegisteredUserController.php +++ b/app/Http/Controllers/Auth/RegisteredUserController.php @@ -32,7 +32,11 @@ class RegisteredUserController extends Controller 'name' => ['required', 'string', 'max:255', new ReservedIdentifier('name')], 'email' => ['required', 'string', 'email', 'max:255', 'unique:users', new NotDisposableEmail, new ReservedIdentifier('email')], 'password' => ['required', 'confirmed', Password::defaults()], - 'birthday' => ['required', 'date', 'before:today'], + // Age gate: must be at least 13 on sign-up day. The front-end + // date picker already caps the year dropdown, but the server + // must enforce it so a client bypass doesn't let a 10-year-old + // through. + 'birthday' => ['required', 'date', 'before:' . now()->subYears(13)->toDateString()], 'gender' => ['required', 'in:male,female'], 'nationality' => ['required', 'string', 'size:2'], ]); diff --git a/resources/views/admin/dashboard.blade.php b/resources/views/admin/dashboard.blade.php index 5fa96f8..3b5964a 100644 --- a/resources/views/admin/dashboard.blade.php +++ b/resources/views/admin/dashboard.blade.php @@ -292,13 +292,16 @@ {{-- Ready Videos --}}
-
+
{{ number_format($videosByStatus->get('ready', 0)) }}
-
Live Videos
+ {{-- "Ready" matches the DB status column; "Live Videos" was misleading + — nothing streams live from this card, it just counts videos that + finished processing successfully. --}} +
Ready
@php $failPct = $stats['totalVideos'] > 0 ? round(($failedCount/$stats['totalVideos'])*100,1) : 0; @endphp
{{ $failedCount }} failed diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index c69a50f..4f2e54e 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -38,7 +38,10 @@
- + {{-- COPPA / platform minimum age: 13 at sign-up. maxYear caps + the year dropdown at (this year − 13). --}} +
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 4491d28..f629573 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -1218,6 +1218,20 @@ + {{-- Skip link: keyboard users land here first and can jump straight to + the main content region, past the header + sidebar nav. Hidden + off-screen until focused. --}} + Skip to content + @include('layouts.partials.header') diff --git a/resources/views/layouts/partials/header.blade.php b/resources/views/layouts/partials/header.blade.php index 4c89af4..9eb4fc5 100644 --- a/resources/views/layouts/partials/header.blade.php +++ b/resources/views/layouts/partials/header.blade.php @@ -1,8 +1,8 @@
-