+ {{-- aria-current="page" on the active chip so assistive tech can read
+ the current filter. "New to You" was renamed to "Recent" — it was
+ just the latest filter, not a personalised recommendation, so the
+ old label overpromised. --}}
+ @php
+ $isAll = $activeFilter === 'all';
+ $isTrending = request()->is('trending');
+ $isMusic = $activeFilter === 'music';
+ $isMatch = $activeFilter === 'match';
+ $isShorts = request()->is('shorts');
+ $isPlaylists = $activeFilter === 'playlists';
+ $isRecent = $activeFilter === 'latest';
+ @endphp
All
+ class="yt-chip {{ $isAll ? 'active' : '' }}" @if($isAll) aria-current="page"@endif>All
Trending
+ class="yt-chip {{ $isTrending ? 'active' : '' }}" @if($isTrending) aria-current="page"@endif>Trending
Music
+ class="yt-chip {{ $isMusic ? 'active' : '' }}" @if($isMusic) aria-current="page"@endif>Music
Sports
+ class="yt-chip {{ $isMatch ? 'active' : '' }}" @if($isMatch) aria-current="page"@endif>Sports
Shorts
+ class="yt-chip {{ $isShorts ? 'active' : '' }}" @if($isShorts) aria-current="page"@endif>Shorts
Playlists
+ class="yt-chip {{ $isPlaylists ? 'active' : '' }}" @if($isPlaylists) aria-current="page"@endif>Playlists
New to You
+ class="yt-chip {{ $isRecent ? 'active' : '' }}" @if($isRecent) aria-current="page"@endif>Recent
@if(!empty($langChips ?? []))
@php $activeLang = str_starts_with($activeFilter, 'lang:') ? substr($activeFilter, 5) : null; @endphp
@@ -81,6 +94,7 @@
@foreach($langChips as $chip)
{{ $chip['name'] }}