Skip to content

Add role=status to points regions #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/ExerciseQuestion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const ExerciseQuestion = React.forwardRef((props: ExerciseQuestionProps,
</Question>
<StepCardFooter className="step-card-footer">
<div className="step-card-footer-inner">
<div className="points">
<div className="points" role="status">
{available_points ? <strong>Points: {available_points}</strong> : null}
<span className="attempts-left">
{hasMultipleAttempts &&
Expand Down
2 changes: 1 addition & 1 deletion src/components/FreeResponseInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const FreeResponseInput = (props: FreeResponseProps) => {
</div>
<StepCardFooter>
{availablePoints
? <div className="points"><strong>Points: {availablePoints}</strong></div>
? <div className="points" role="status"><strong>Points: {availablePoints}</strong></div>
: null}
<div className="controls">
<RevertButton disabled={!textHasChanged} onClick={cancelHandler} />
Expand Down
5 changes: 5 additions & 0 deletions src/components/__snapshots__/Exercise.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ exports[`Exercise using step data matches snapshot 1`] = `
>
<div
className="points"
role="status"
>
<span
className="attempts-left"
Expand Down Expand Up @@ -372,6 +373,7 @@ exports[`Exercise with question state data matches snapshot 1`] = `
>
<div
className="points"
role="status"
>
<span
className="attempts-left"
Expand Down Expand Up @@ -708,6 +710,7 @@ exports[`Exercise with question state data renders header icons with multiple ch
>
<div
className="points"
role="status"
>
<span
className="attempts-left"
Expand Down Expand Up @@ -1084,6 +1087,7 @@ exports[`Exercise with question state data renders header icons with two-step ex
>
<div
className="points"
role="status"
>
<span
className="attempts-left"
Expand Down Expand Up @@ -1280,6 +1284,7 @@ exports[`Exercise with question state data shows a detailed solution 1`] = `
>
<div
className="points"
role="status"
>
<span
className="attempts-left"
Expand Down
9 changes: 9 additions & 0 deletions src/components/__snapshots__/ExerciseQuestion.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ exports[`ExerciseQuestion matches snapshot 1`] = `
>
<div
className="points"
role="status"
>
<strong>
Points:
Expand Down Expand Up @@ -282,6 +283,7 @@ exports[`ExerciseQuestion renders Re-submit button 1`] = `
>
<div
className="points"
role="status"
>
<strong>
Points:
Expand Down Expand Up @@ -440,6 +442,7 @@ exports[`ExerciseQuestion renders Save button 1`] = `
>
<div
className="points"
role="status"
>
<strong>
Points:
Expand Down Expand Up @@ -592,6 +595,7 @@ exports[`ExerciseQuestion renders all attempts remaining 1`] = `
>
<div
className="points"
role="status"
>
<strong>
Points:
Expand Down Expand Up @@ -756,6 +760,7 @@ exports[`ExerciseQuestion renders continue button (unused?) 1`] = `
>
<div
className="points"
role="status"
>
<strong>
Points:
Expand Down Expand Up @@ -901,6 +906,7 @@ exports[`ExerciseQuestion renders detailed solution and published comments 1`] =
>
<div
className="points"
role="status"
>
<strong>
Points:
Expand Down Expand Up @@ -1076,6 +1082,7 @@ exports[`ExerciseQuestion renders free response 1`] = `
>
<div
className="points"
role="status"
>
<strong>
Points:
Expand Down Expand Up @@ -1233,6 +1240,7 @@ exports[`ExerciseQuestion renders no attempts remaining 1`] = `
>
<div
className="points"
role="status"
>
<strong>
Points:
Expand Down Expand Up @@ -1390,6 +1398,7 @@ exports[`ExerciseQuestion renders some attempts remaining 1`] = `
>
<div
className="points"
role="status"
>
<strong>
Points:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ exports[`Free Response Input matches snapshot 1`] = `
>
<div
className="points"
role="status"
>
<strong>
Points:
Expand Down Expand Up @@ -128,6 +129,7 @@ exports[`Free Response Input renders leftInfoComponent component 1`] = `
>
<div
className="points"
role="status"
>
<strong>
Points:
Expand Down Expand Up @@ -210,6 +212,7 @@ exports[`Free Response Input renders word limit error 1`] = `
>
<div
className="points"
role="status"
>
<strong>
Points:
Expand Down
Loading