Skip to content

Commit

Permalink
Make question-info a heading
Browse files Browse the repository at this point in the history
[CORE-418]
  • Loading branch information
RoyEJohnson committed Dec 11, 2024
1 parent 86c1455 commit 3921300
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ const StepCard = ({
<StepCardHeader>
<div>
{leftHeaderChildren}
<div className="question-info">
<div className="question-info" role="heading" aria-level={2}>
{headerTitleChildren}
<span>{formattedQuestionNumber}</span>
{showTotalQuestions ? <span className="num-questions">&nbsp;/ {numberOfQuestions}</span> : null}
Expand Down
10 changes: 10 additions & 0 deletions src/components/__snapshots__/Card.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ exports[`StepCard matches snapshot 1`] = `
>
<div>
<div
aria-level={2}
className="question-info"
role="heading"
>
<span>
Question 1
Expand Down Expand Up @@ -59,7 +61,9 @@ exports[`StepCard matches snapshot with more than one question 1`] = `
>
<div>
<div
aria-level={2}
className="question-info"
role="heading"
>
<span>
Questions 1 - 3
Expand Down Expand Up @@ -113,7 +117,9 @@ exports[`TaskStepCard can optionally provide task 1`] = `
>
<div>
<div
aria-level={2}
className="question-info"
role="heading"
>
<span>
Question 1
Expand Down Expand Up @@ -152,7 +158,9 @@ exports[`TaskStepCard can optionally provide type 1`] = `
>
<div>
<div
aria-level={2}
className="question-info"
role="heading"
>
<span>
Question 1
Expand Down Expand Up @@ -191,7 +199,9 @@ exports[`TaskStepCard matches snapshot 1`] = `
>
<div>
<div
aria-level={2}
className="question-info"
role="heading"
>
<span>
Question 1
Expand Down
10 changes: 10 additions & 0 deletions src/components/__snapshots__/Exercise.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ exports[`Exercise using step data matches snapshot 1`] = `
>
<div>
<div
aria-level={2}
className="question-info"
role="heading"
>
<span>
Question 1
Expand Down Expand Up @@ -207,7 +209,9 @@ exports[`Exercise with question state data matches snapshot 1`] = `
>
<div>
<div
aria-level={2}
className="question-info"
role="heading"
>
<span>
Question 1
Expand Down Expand Up @@ -446,7 +450,9 @@ exports[`Exercise with question state data renders header icons with multiple ch
>
<div>
<div
aria-level={2}
className="question-info"
role="heading"
>
<span>
Question 1
Expand Down Expand Up @@ -771,7 +777,9 @@ exports[`Exercise with question state data renders header icons with two-step ex
>
<div>
<div
aria-level={2}
className="question-info"
role="heading"
>
<span>
Question 1
Expand Down Expand Up @@ -1082,7 +1090,9 @@ exports[`Exercise with question state data shows a detailed solution 1`] = `
>
<div>
<div
aria-level={2}
className="question-info"
role="heading"
>
<span>
Question 1
Expand Down

0 comments on commit 3921300

Please sign in to comment.