@@ -446,8 +446,11 @@ function KVEntryCard({ kvEntry }: { kvEntry: KVEntry }) {
446
446
// Component for database reset section
447
447
function DatabaseResetSection ( ) {
448
448
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
+ >
451
454
Database Reset
452
455
</ h2 >
453
456
< 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() {
457
460
fresh data.
458
461
</ p >
459
462
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
+ >
461
467
< div className = "flex" >
462
468
< div className = "flex-shrink-0" >
463
469
< svg
464
470
className = "h-5 w-5 text-yellow-400 dark:text-yellow-300"
465
471
viewBox = "0 0 20 20"
466
472
fill = "currentColor"
473
+ aria-hidden = "true"
467
474
>
468
475
< path
469
476
fillRule = "evenodd"
@@ -490,7 +497,8 @@ function DatabaseResetSection() {
490
497
< input type = "hidden" name = "intent" value = "reset-database" />
491
498
< button
492
499
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"
494
502
onClick = { ( e ) => {
495
503
if (
496
504
! confirm (
@@ -503,6 +511,10 @@ function DatabaseResetSection() {
503
511
>
504
512
Reset Database and KV Store
505
513
</ 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 >
506
518
</ Form >
507
519
</ div >
508
520
</ section >
@@ -520,15 +532,24 @@ export default function Home({ loaderData }: Route.ComponentProps) {
520
532
return (
521
533
< 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" >
522
534
< 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
+ >
529
546
Users & Entries
530
547
</ 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
+ >
532
553
< div className = "grid gap-8" >
533
554
{ users . map ( ( user ) => (
534
555
< UserCard key = { user . id } user = { user } />
@@ -539,8 +560,11 @@ export default function Home({ loaderData }: Route.ComponentProps) {
539
560
540
561
< hr className = "my-6" />
541
562
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
+ >
544
568
KV Store Entries ({ kvEntries . length } )
545
569
</ h2 >
546
570
< div className = { kvContainerClass } >
0 commit comments