@@ -446,8 +446,11 @@ function KVEntryCard({ kvEntry }: { kvEntry: KVEntry }) {
446446// Component for database reset section
447447function DatabaseResetSection ( ) {
448448 return (
449- < section >
450- < h2 className = "mb-6 text-2xl font-bold text-gray-900 dark:text-white" >
449+ < section aria-labelledby = "db-reset-heading" >
450+ < h2
451+ id = "db-reset-heading"
452+ className = "mb-6 text-2xl font-bold text-gray-900 dark:text-white"
453+ >
451454 Database Reset
452455 </ h2 >
453456 < div className = "rounded-lg border border-gray-200 bg-white p-6 shadow-lg dark:border-gray-700 dark:bg-gray-800 dark:shadow-gray-900/50" >
@@ -457,13 +460,17 @@ function DatabaseResetSection() {
457460 fresh data.
458461 </ p >
459462
460- < div className = "mb-6 rounded-lg border border-yellow-200 bg-yellow-50 p-4 dark:border-yellow-700 dark:bg-yellow-900/20" >
463+ < div
464+ className = "mb-6 rounded-lg border border-yellow-200 bg-yellow-50 p-4 dark:border-yellow-700 dark:bg-yellow-900/20"
465+ role = "alert"
466+ >
461467 < div className = "flex" >
462468 < div className = "flex-shrink-0" >
463469 < svg
464470 className = "h-5 w-5 text-yellow-400 dark:text-yellow-300"
465471 viewBox = "0 0 20 20"
466472 fill = "currentColor"
473+ aria-hidden = "true"
467474 >
468475 < path
469476 fillRule = "evenodd"
@@ -490,7 +497,8 @@ function DatabaseResetSection() {
490497 < input type = "hidden" name = "intent" value = "reset-database" />
491498 < button
492499 type = "submit"
493- className = "rounded-lg bg-red-600 px-6 py-3 font-bold text-white transition-colors duration-200 hover:bg-red-700"
500+ className = "rounded-lg bg-red-600 px-6 py-3 font-bold text-white transition-colors duration-200 hover:bg-red-700 focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:outline-none"
501+ aria-describedby = "reset-warning"
494502 onClick = { ( e ) => {
495503 if (
496504 ! confirm (
@@ -503,6 +511,10 @@ function DatabaseResetSection() {
503511 >
504512 Reset Database and KV Store
505513 </ button >
514+ < div id = "reset-warning" className = "sr-only" >
515+ Warning: This action will permanently delete all data and cannot be
516+ undone.
517+ </ div >
506518 </ Form >
507519 </ div >
508520 </ section >
@@ -520,15 +532,24 @@ export default function Home({ loaderData }: Route.ComponentProps) {
520532 return (
521533 < div className = "min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 p-8 dark:from-gray-900 dark:to-gray-800" >
522534 < div className = "mx-auto max-w-6xl" >
523- < h1 className = "mb-8 text-4xl font-bold text-gray-900 dark:text-white" >
524- Epic Me App
525- </ h1 >
526-
527- < section className = "mb-12" >
528- < h2 className = "mb-6 text-2xl font-bold text-gray-800 dark:text-gray-200" >
535+ < header >
536+ < h1 className = "mb-8 text-4xl font-bold text-gray-900 dark:text-white" >
537+ Epic Me App
538+ </ h1 >
539+ </ header >
540+
541+ < section className = "mb-12" aria-labelledby = "users-entries-heading" >
542+ < h2
543+ id = "users-entries-heading"
544+ className = "mb-6 text-2xl font-bold text-gray-800 dark:text-gray-200"
545+ >
529546 Users & Entries
530547 </ h2 >
531- < div className = "h-[32rem] overflow-y-auto rounded-lg border border-gray-200 bg-white p-6 shadow-lg dark:border-gray-700 dark:bg-gray-800 dark:shadow-gray-900/50" >
548+ < div
549+ className = "h-[32rem] overflow-y-auto rounded-lg border border-gray-200 bg-white p-6 shadow-lg dark:border-gray-700 dark:bg-gray-800 dark:shadow-gray-900/50"
550+ role = "region"
551+ aria-label = "Users and entries data"
552+ >
532553 < div className = "grid gap-8" >
533554 { users . map ( ( user ) => (
534555 < UserCard key = { user . id } user = { user } />
@@ -539,8 +560,11 @@ export default function Home({ loaderData }: Route.ComponentProps) {
539560
540561 < hr className = "my-6" />
541562
542- < section >
543- < h2 className = "mb-6 text-2xl font-bold text-gray-900 dark:text-white" >
563+ < section aria-labelledby = "kv-entries-heading" >
564+ < h2
565+ id = "kv-entries-heading"
566+ className = "mb-6 text-2xl font-bold text-gray-900 dark:text-white"
567+ >
544568 KV Store Entries ({ kvEntries . length } )
545569 </ h2 >
546570 < div className = { kvContainerClass } >
0 commit comments