From b1678736328667e21be8e8fb5a51b48da1187a6a Mon Sep 17 00:00:00 2001 From: Dan Church Date: Mon, 27 Sep 2021 12:00:48 -0500 Subject: [PATCH 1/5] Fix grouping error in PostgreSQL --- app/Services/AdminStatsService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Services/AdminStatsService.php b/app/Services/AdminStatsService.php index 6c389e0c..a3ae6b2a 100644 --- a/app/Services/AdminStatsService.php +++ b/app/Services/AdminStatsService.php @@ -68,8 +68,8 @@ class AdminStatsService { $ttl = now()->addHours(12); return Cache::remember('admin:dashboard:home:data-postsGraph:v0.1:24hr', $ttl, function() { - $gb = config('database.default') == 'pgsql' ? ['statuses.id', DB::raw('Date(created_at)')] : DB::raw('Date(created_at)'); - $s = Status::selectRaw('Date(created_at) as date, count(statuses.id) as count, statuses.*') + $gb = config('database.default') == 'pgsql' ? ['statuses.id', 'created_at'] : DB::raw('Date(created_at)'); + $s = Status::selectRaw('Date(created_at) as date, count(statuses.id) as count') ->where('created_at', '>=', now()->subWeek()) ->groupBy($gb) ->orderBy('created_at', 'DESC') @@ -86,7 +86,7 @@ class AdminStatsService $dates = collect($dates)->merge($s); - $s = Status::selectRaw('Date(created_at) as date, count(statuses.id) as count, statuses.*') + $s = Status::selectRaw('Date(created_at) as date, count(statuses.id) as count') ->where('created_at', '>=', now()->subWeeks(2)) ->where('created_at', '<=', now()->subWeeks(1)) ->groupBy($gb) From 345d7eed2c51b815f25184e857d6fca52fc89b5b Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Sat, 6 Nov 2021 10:25:46 -0400 Subject: [PATCH 2/5] fix broken accessibility for search field This PR fixes the incorrect use of `role=search` on the `` element. The `search` role is not a type of text input, and its use here was negating the semantics of the text field's ability to announce itself as a text field to screen readers. The proper place for a `role=search` is on the `
` element that contains this input, so I have placed it there in this fix. There are likely other accessibility improvements that could be made in this file, but this was an easy fix that I figured I could make a quick PR for. Thanks --- resources/views/layouts/partial/nav.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/layouts/partial/nav.blade.php b/resources/views/layouts/partial/nav.blade.php index 032474f9..0cd1405e 100644 --- a/resources/views/layouts/partial/nav.blade.php +++ b/resources/views/layouts/partial/nav.blade.php @@ -8,8 +8,8 @@