ReviewOS

also looking at this

stacks/bench-review

Adopt the hq-apps app conventions

#76
Merged glennmichael123 wants to merge chore/hq-apps-conventions into main
31 files +1656 -395

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

resources/components/Bench/Admin/ReviewsTable.stxmodified+1-0
Changes to resources/components/Bench/Admin/ReviewsTable.stx
@@ -272,6 +272,7 @@
272272 <textarea
273273 x-model="responseDraft"
274274 rows="4"
275 aria-label="Judge's official response"
275276 placeholder="Enter the judge's official response…"
276277 class="block mt-2 px-3 py-2 w-full text-gray-900 text-sm bg-white border border-gray-300 rounded-md focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-200"
277278 ></textarea>
resources/components/Bench/ArticleView.stxmodified+1-0
Changes to resources/components/Bench/ArticleView.stx
@@ -820,6 +820,7 @@
820820 <textarea
821821 x-model="judgeResponseDraft"
822822 rows="4"
823 aria-label="Your official response to this review"
823824 placeholder="Write your official response…"
824825 class="block mt-2 px-3 py-2 w-full text-gray-900 text-sm bg-white border border-gray-300 rounded-md focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-200"
825826 ></textarea>
resources/components/Bench/BenchComingSoon.stxmodified+1-1
Changes to resources/components/Bench/BenchComingSoon.stx
@@ -78,7 +78,7 @@
7878 <div class="mt-12">
7979 <form @submit.prevent="submitEmail()" class="flex gap-x-4 max-w-md">
8080 <div class="relative flex-auto">
81 <input type="email" x-model="email" placeholder="Enter your email" required x-disabled="loading"
81 <input type="email" x-model="email" aria-label="Email address" placeholder="Enter your email" required x-disabled="loading"
8282 class="block px-4 py-3 w-full text-gray-900 sm:leading-6 sm:text-sm placeholder:text-gray-400 bg-off-gray border-0 ring-1 ring-gray-300 ring-inset rounded-md focus:ring-2 focus:ring-gray-600 focus:ring-inset shadow-sm">
8383 </div>
8484 <button type="submit" x-disabled="loading"
resources/components/Bench/Comments.stxmodified+1-0
Changes to resources/components/Bench/Comments.stx
@@ -205,6 +205,7 @@
205205 id="comment-body"
206206 x-model="commentDraft"
207207 rows="3"
208 aria-label="Add a comment"
208209 placeholder="Add a comment — context, clarification, or a respectful pushback."
209210 @input="commentFieldError.set(false)"
210211 @focus="commentFieldError.set(false)"
resources/components/Bench/ConfirmHost.stxmodified+14-3
Changes to resources/components/Bench/ConfirmHost.stx
@@ -117,7 +117,18 @@
117117 @click="$event.stopPropagation()"
118118 class="p-6 max-w-md w-full bg-white border border-gray-200 rounded-2xl shadow-xl"
119119 >
120 <h2 id="bench-confirm-title" class="font-semibold text-gray-900 text-lg" :text="confirmStore.title()"></h2>
120 {{--
121 The static text inside these four elements mirrors the confirm store's
122 own defaults ('Are you sure?' / 'Confirm' / 'Cancel'), and `:text`
123 overwrites it the moment the dialog is asked to open. It is NOT dead
124 markup: without it the static build ships an empty <h2> and two buttons
125 with no accessible name, which is both an a11y defect (a screen reader
126 announces an empty heading and two unlabelled buttons) and a
127 release-gate failure — scripts/validate-release.ts rejects an empty
128 primary heading, and scripts/validate-ui.ts rejects an icon-only button
129 with no name. Keep these in sync with resources/stores/confirm.ts.
130 --}}
131 <h2 id="bench-confirm-title" class="font-semibold text-gray-900 text-lg" :text="confirmStore.title()">Are you sure?</h2>
121132 <p id="bench-confirm-message" class="mt-2 text-gray-600 text-sm" :text="confirmStore.message()"></p>
122133 <div class="flex gap-3 justify-end mt-6">
123134 <button
@@ -125,14 +136,14 @@
125136 @click="confirmStore.dismiss()"
126137 class="px-4 py-2 font-medium text-gray-700 text-sm bg-white hover:bg-gray-50 border border-gray-300 rounded-lg transition-colors"
127138 :text="confirmStore.cancelLabel()"
128 ></button>
139 >Cancel</button>
129140 <button
130141 type="button"
131142 @click="confirmStore.accept()"
132143 class="px-4 py-2 font-medium text-sm text-white rounded-lg transition-colors"
133144 x-class="acceptClass()"
134145 :text="confirmStore.confirmLabel()"
135 ></button>
146 >Confirm</button>
136147 </div>
137148 </div>
138149</div>
resources/components/Bench/Court/CourtHouseDirectory.stxmodified+1-0
Changes to resources/components/Bench/Court/CourtHouseDirectory.stx
@@ -196,6 +196,7 @@
196196 <input
197197 type="text"
198198 x-model="searchQuery"
199 aria-label="Search courthouses by name, city, or state"
199200 placeholder="Search by name, city, or state..."
200201 class="block pl-12 pr-4 py-3 w-full text-gray-900 sm:leading-6 sm:text-sm placeholder:text-gray-400 bg-gray-50 border-0 ring-1 ring-gray-200 ring-inset rounded-xl focus:ring-2 focus:ring-inset focus:ring-softBrown duration-200 transition-all"
201202 >
resources/components/Bench/Court/CourtJudges.stxmodified+1-1
Changes to resources/components/Bench/Court/CourtJudges.stx
@@ -22,7 +22,7 @@
2222 <p class="mt-1 text-gray-500 text-sm">{{ `Active judges currently sitting at ${court.name}` }}</p>
2323 </div>
2424 <div class="hidden sm:block">
25 <select class="pl-3 pr-10 py-2 text-gray-900 sm:text-sm bg-white ring-1 ring-gray-300 ring-inset rounded-md focus:ring-2 focus:ring-blue-600 focus:ring-inset">
25 <select aria-label="Filter judges by department" class="pl-3 pr-10 py-2 text-gray-900 sm:text-sm bg-white ring-1 ring-gray-300 ring-inset rounded-md focus:ring-2 focus:ring-blue-600 focus:ring-inset">
2626 <option>All Departments</option>
2727 <option>Criminal</option>
2828 <option>Civil</option>
resources/components/Bench/Judge/JudgeDirectory.stxmodified+1-0
Changes to resources/components/Bench/Judge/JudgeDirectory.stx
@@ -263,6 +263,7 @@
263263 type="text"
264264 x-model="searchQuery"
265265 @input="resetWindow()"
266 aria-label="Search judges by name, court, or location"
266267 placeholder="Search by name, court, or location..."
267268 class="block pl-12 pr-4 py-3 w-full text-gray-900 sm:leading-6 sm:text-sm placeholder:text-gray-400 bg-gray-50 border-0 ring-1 ring-gray-200 ring-inset rounded-xl focus:ring-2 focus:ring-inset focus:ring-softBrown duration-200 transition-all"
268269 >
resources/components/Bench/Judge/ReviewJudgeSearch.stxmodified+1-0
Changes to resources/components/Bench/Judge/ReviewJudgeSearch.stx
@@ -88,6 +88,7 @@
8888 :value="searchInput()"
8989 @input="handleInput($event.target.value)"
9090 class="block pl-10 pr-10 py-3 w-full text-gray-900 text-sm placeholder:text-gray-400 bg-white border border-gray-300 rounded-md focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-200 shadow-sm"
91 aria-label="Search for a judge"
9192 placeholder="Search for a judge..."
9293 autocomplete="off"
9394 >
resources/components/Bench/MobileMenu.stxmodified+1-0
Changes to resources/components/Bench/MobileMenu.stx
@@ -34,6 +34,7 @@
3434 <input
3535 type="text"
3636 x-model="mobileSearchQuery"
37 aria-label="Search judges or courts"
3738 placeholder="Search judges or courts..."
3839 class="block pl-9 pr-3 py-2 w-full text-gray-900 sm:text-sm placeholder:text-gray-400 bg-white border-0 ring-1 ring-gray-200 ring-inset rounded-lg focus:ring-2 focus:ring-blue-600 focus:ring-inset"
3940 >
resources/components/Bench/SearchView.stxmodified+1-0
Changes to resources/components/Bench/SearchView.stx
@@ -75,6 +75,7 @@
7575 <input
7676 type="text"
7777 x-model="search.query"
78 aria-label="Search judges, courts, or locations"
7879 placeholder="Search judges, courts, or locations..."
7980 class="block pl-12 pr-32 py-4 w-full text-gray-900 sm:text-base placeholder:text-gray-400 bg-white border-0 ring-1 ring-gray-200 ring-inset rounded-xl focus:ring-2 focus:ring-blue-600 focus:ring-inset shadow-sm"
8081 >
resources/components/Bench/VerifyEmail.stxmodified+2-2
Changes to resources/components/Bench/VerifyEmail.stx
@@ -93,7 +93,7 @@
9393 x-disabled="resending"
9494 class="inline-flex items-center mt-5 px-4 py-2 font-semibold text-sm text-white bg-blue-600 hover:bg-blue-700 rounded-md disabled:opacity-50"
9595 :text="resending() ? 'Sending…' : 'Resend verification email'"
96 ></button>
96 >Resend verification email</button>
9797 <p class="mt-3 text-gray-500 text-xs" :text="resendNote()"></p>
9898 </div>
9999
@@ -107,7 +107,7 @@
107107 x-disabled="resending"
108108 class="inline-flex items-center mt-5 px-4 py-2 font-semibold text-gray-800 text-sm bg-white hover:bg-gray-50 border border-gray-300 rounded-md disabled:opacity-50"
109109 :text="resending() ? 'Sending…' : 'Resend verification email'"
110 ></button>
110 >Resend verification email</button>
111111 <p class="mt-3 text-gray-500 text-xs" :text="resendNote()"></p>
112112 </div>
113113 </div>