@@ -395,7 +395,7 @@ export function Exam() {
395395 fullQuestion = { fullQuestion }
396396 newSelectedAnswers = { newSelectedAnswers }
397397 />
398- < Box overflowY = "hidden" >
398+ < Box overflowY = "hidden" as = "main" id = "main-content" >
399399 < Box width = { "full" } mt = "2em" >
400400 < Center height = { "100%" } display = { "flex" } flexDirection = { "column" } >
401401 < Center width = "full" borderBottom = { "2px" } borderColor = { "gray.300" } >
@@ -576,7 +576,9 @@ function Timer({
576576 } , [ secondsLeft ] ) ;
577577
578578 return (
579- < Text fontWeight = { "bold" } > Time: { secondsToHHMMSS ( availableTime ) } </ Text >
579+ < Text fontWeight = { "bold" } aria-live = "polite" aria-atomic = "true" >
580+ Time: { secondsToHHMMSS ( availableTime ) }
581+ </ Text >
580582 ) ;
581583}
582584
@@ -622,9 +624,14 @@ function NavigationBubbles({
622624 const bubblesArr = getCurrentBubbleIndex ( wantedIndex ) ;
623625
624626 return (
625- < Flex width = "80%" justifyContent = { "center" } >
627+ < Flex
628+ width = "80%"
629+ justifyContent = { "center" }
630+ as = "nav"
631+ aria-label = "Question navigation"
632+ >
626633 < IconButton
627- aria-label = "previous question"
634+ aria-label = "Go to previous question"
628635 icon = { < ChevronLeftIcon /> }
629636 m = { "0.3em" }
630637 isDisabled = { currentQuestionNumber === 1 }
@@ -633,7 +640,7 @@ function NavigationBubbles({
633640 } }
634641 />
635642 < IconButton
636- aria-label = "previous set of questions"
643+ aria-label = "Go to previous set of questions"
637644 icon = { < ArrowLeftIcon /> }
638645 m = { "0.3em" }
639646 isDisabled = { wantedIndex === 0 }
@@ -655,12 +662,24 @@ function NavigationBubbles({
655662 className = { `bottom-bubble-nav ${
656663 currentQuestionNumber === question_num ? "bubble-active" : ""
657664 } ${ isAnswered ( question_num ) ? "bubble-answered" : "" } `}
665+ role = "button"
666+ tabIndex = { 0 }
667+ aria-label = { `Go to question ${ question_num } ${ isAnswered ( question_num ) ? " (answered)" : "" } ` }
668+ aria-current = {
669+ currentQuestionNumber === question_num ? "page" : undefined
670+ }
671+ onKeyDown = { ( e ) => {
672+ if ( e . key === "Enter" || e . key === " " ) {
673+ e . preventDefault ( ) ;
674+ specificQuestion ( question_num ) ;
675+ }
676+ } }
658677 >
659678 < Text > { question_num . toString ( ) } </ Text >
660679 </ Box >
661680 ) ) }
662681 < IconButton
663- aria-label = "next"
682+ aria-label = "Go to next set of questions "
664683 icon = { < ArrowRightIcon /> }
665684 m = { "0.3em" }
666685 isDisabled = { maxIndex == wantedIndex }
@@ -669,7 +688,7 @@ function NavigationBubbles({
669688 } }
670689 />
671690 < IconButton
672- aria-label = "next question"
691+ aria-label = "Go to next question"
673692 icon = { < ChevronRightIcon /> }
674693 m = { "0.3em" }
675694 isDisabled = { currentQuestionNumber === questions . length }
0 commit comments