Skip to content

Commit

Permalink
remove region role from answer (#71)
Browse files Browse the repository at this point in the history
* remove region role from answer

* update snapshots

---------

Co-authored-by: Thomas Woodward <[email protected]>
  • Loading branch information
jivey and TomWoodward authored May 6, 2024
1 parent 05449c8 commit f6b12d4
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 63 deletions.
2 changes: 1 addition & 1 deletion src/components/Answer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export const Answer = (props: AnswerProps) => {

return (
<div className="openstax-answer">
<section role="region" className={classes}>
<section className={classes}>
{body}
</section>
</div>
Expand Down
8 changes: 0 additions & 8 deletions src/components/__snapshots__/Answer.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ exports[`Answer matches snapshot 1`] = `
>
<section
className="answers-answer"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -63,7 +62,6 @@ exports[`Answer renders a checked answer 1`] = `
>
<section
className="answers-answer answer-selected"
role="region"
>
<input
checked={true}
Expand Down Expand Up @@ -120,7 +118,6 @@ exports[`Answer renders a correct answer 1`] = `
>
<section
className="answers-answer disabled answer-correct"
role="region"
>
<label
className="answer-label"
Expand Down Expand Up @@ -174,7 +171,6 @@ exports[`Answer renders an incorrect answer 1`] = `
>
<section
className="answers-answer answer-incorrect"
role="region"
>
<label
className="answer-label"
Expand Down Expand Up @@ -228,7 +224,6 @@ exports[`Answer renders feedback 1`] = `
>
<section
className="answers-answer"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -295,7 +290,6 @@ exports[`Answer renders teacher preview 1`] = `
>
<section
className="answers-answer answer-correct"
role="region"
>
<div
className="correct-incorrect"
Expand Down Expand Up @@ -356,7 +350,6 @@ exports[`Answer renders teacher review 1`] = `
>
<section
className="answers-answer"
role="region"
>
<div
className="review-wrapper"
Expand Down Expand Up @@ -404,7 +397,6 @@ exports[`Answer renders with a custom renderer if set 1`] = `
>
<section
className="answers-answer"
role="region"
>
<input
checked={false}
Expand Down
12 changes: 0 additions & 12 deletions src/components/__snapshots__/AnswersTable.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ exports[`AnswersTable matches tutor teacher-preview snapshot 1`] = `
>
<section
className="answers-answer disabled"
role="region"
>
<div
className="correct-incorrect"
Expand Down Expand Up @@ -57,7 +56,6 @@ exports[`AnswersTable matches tutor teacher-preview snapshot 1`] = `
>
<section
className="answers-answer disabled"
role="region"
>
<div
className="correct-incorrect"
Expand Down Expand Up @@ -112,7 +110,6 @@ exports[`AnswersTable renders all feedback 1`] = `
>
<section
className="answers-answer disabled answer-selected answer-incorrect"
role="region"
>
<input
checked={true}
Expand Down Expand Up @@ -184,7 +181,6 @@ exports[`AnswersTable renders all feedback 1`] = `
>
<section
className="answers-answer disabled answer-correct"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -263,7 +259,6 @@ exports[`AnswersTable renders correct answer feedback 1`] = `
>
<section
className="answers-answer disabled answer-selected answer-correct"
role="region"
>
<label
className="answer-label"
Expand Down Expand Up @@ -326,7 +321,6 @@ exports[`AnswersTable renders correct answer feedback 1`] = `
>
<section
className="answers-answer disabled"
role="region"
>
<label
className="answer-label"
Expand Down Expand Up @@ -372,7 +366,6 @@ exports[`AnswersTable renders incorrect answer feedback 1`] = `
>
<section
className="answers-answer disabled answer-selected answer-incorrect"
role="region"
>
<input
checked={true}
Expand Down Expand Up @@ -444,7 +437,6 @@ exports[`AnswersTable renders incorrect answer feedback 1`] = `
>
<section
className="answers-answer disabled answer-correct"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -508,7 +500,6 @@ exports[`AnswersTable renders instructions 1`] = `
>
<section
className="answers-answer disabled"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -556,7 +547,6 @@ exports[`AnswersTable renders instructions 1`] = `
>
<section
className="answers-answer disabled"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -611,7 +601,6 @@ exports[`AnswersTable sorts by given ID order 1`] = `
>
<section
className="answers-answer disabled"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -659,7 +648,6 @@ exports[`AnswersTable sorts by given ID order 1`] = `
>
<section
className="answers-answer disabled"
role="region"
>
<input
checked={false}
Expand Down
10 changes: 0 additions & 10 deletions src/components/__snapshots__/Exercise.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ exports[`Exercise using step data matches snapshot 1`] = `
>
<section
className="answers-answer disabled answer-selected"
role="region"
>
<input
checked={true}
Expand Down Expand Up @@ -125,7 +124,6 @@ exports[`Exercise using step data matches snapshot 1`] = `
>
<section
className="answers-answer disabled"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -275,7 +273,6 @@ exports[`Exercise with question state data matches snapshot 1`] = `
>
<section
className="answers-answer disabled answer-selected"
role="region"
>
<input
checked={true}
Expand Down Expand Up @@ -323,7 +320,6 @@ exports[`Exercise with question state data matches snapshot 1`] = `
>
<section
className="answers-answer disabled"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -613,7 +609,6 @@ exports[`Exercise with question state data renders header icons with multiple ch
>
<section
className="answers-answer disabled answer-selected"
role="region"
>
<input
checked={true}
Expand Down Expand Up @@ -661,7 +656,6 @@ exports[`Exercise with question state data renders header icons with multiple ch
>
<section
className="answers-answer disabled"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -991,7 +985,6 @@ exports[`Exercise with question state data renders header icons with two-step ex
>
<section
className="answers-answer disabled answer-selected"
role="region"
>
<input
checked={true}
Expand Down Expand Up @@ -1039,7 +1032,6 @@ exports[`Exercise with question state data renders header icons with two-step ex
>
<section
className="answers-answer disabled"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -1189,7 +1181,6 @@ exports[`Exercise with question state data shows a detailed solution 1`] = `
>
<section
className="answers-answer disabled answer-selected"
role="region"
>
<input
checked={true}
Expand Down Expand Up @@ -1237,7 +1228,6 @@ exports[`Exercise with question state data shows a detailed solution 1`] = `
>
<section
className="answers-answer disabled"
role="region"
>
<input
checked={false}
Expand Down
18 changes: 0 additions & 18 deletions src/components/__snapshots__/ExerciseQuestion.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ exports[`ExerciseQuestion matches snapshot 1`] = `
>
<section
className="answers-answer disabled"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -74,7 +73,6 @@ exports[`ExerciseQuestion matches snapshot 1`] = `
>
<section
className="answers-answer disabled"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -179,7 +177,6 @@ exports[`ExerciseQuestion renders Re-submit button 1`] = `
>
<section
className="answers-answer answer-selected"
role="region"
>
<input
checked={true}
Expand Down Expand Up @@ -227,7 +224,6 @@ exports[`ExerciseQuestion renders Re-submit button 1`] = `
>
<section
className="answers-answer answer-incorrect"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -339,7 +335,6 @@ exports[`ExerciseQuestion renders Save button 1`] = `
>
<section
className="answers-answer answer-selected"
role="region"
>
<input
checked={true}
Expand Down Expand Up @@ -387,7 +382,6 @@ exports[`ExerciseQuestion renders Save button 1`] = `
>
<section
className="answers-answer answer-incorrect"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -499,7 +493,6 @@ exports[`ExerciseQuestion renders all attempts remaining 1`] = `
>
<section
className="answers-answer"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -547,7 +540,6 @@ exports[`ExerciseQuestion renders all attempts remaining 1`] = `
>
<section
className="answers-answer"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -659,7 +651,6 @@ exports[`ExerciseQuestion renders continue button (unused?) 1`] = `
>
<section
className="answers-answer disabled"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -707,7 +698,6 @@ exports[`ExerciseQuestion renders continue button (unused?) 1`] = `
>
<section
className="answers-answer disabled answer-incorrect"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -818,7 +808,6 @@ exports[`ExerciseQuestion renders detailed solution and published comments 1`] =
>
<section
className="answers-answer disabled answer-correct"
role="region"
>
<label
className="answer-label"
Expand Down Expand Up @@ -863,7 +852,6 @@ exports[`ExerciseQuestion renders detailed solution and published comments 1`] =
>
<section
className="answers-answer disabled answer-incorrect"
role="region"
>
<label
className="answer-label"
Expand Down Expand Up @@ -989,7 +977,6 @@ exports[`ExerciseQuestion renders free response 1`] = `
>
<section
className="answers-answer disabled"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -1037,7 +1024,6 @@ exports[`ExerciseQuestion renders free response 1`] = `
>
<section
className="answers-answer disabled"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -1142,7 +1128,6 @@ exports[`ExerciseQuestion renders no attempts remaining 1`] = `
>
<section
className="answers-answer disabled"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -1190,7 +1175,6 @@ exports[`ExerciseQuestion renders no attempts remaining 1`] = `
>
<section
className="answers-answer disabled answer-incorrect"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -1301,7 +1285,6 @@ exports[`ExerciseQuestion renders some attempts remaining 1`] = `
>
<section
className="answers-answer"
role="region"
>
<input
checked={false}
Expand Down Expand Up @@ -1349,7 +1332,6 @@ exports[`ExerciseQuestion renders some attempts remaining 1`] = `
>
<section
className="answers-answer answer-incorrect"
role="region"
>
<input
checked={false}
Expand Down
Loading

0 comments on commit f6b12d4

Please sign in to comment.