Skip to content
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

add aria-label to PopoverItem #64

Merged
merged 2 commits into from
Apr 4, 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
7 changes: 6 additions & 1 deletion src/components/ExerciseHeaderIcons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ interface PopoverItemProps {
}

const PopoverItem = (props: PopoverItemProps) => (
<ItemWrapper {...props.wrapperProps} mobile={props.mobile} desktop={props.desktop}>
<ItemWrapper
{...props.wrapperProps}
mobile={props.mobile}
desktop={props.desktop}
aria-label={props.text}
>
<InnerWrapper>
{props.children}
<Popover className="popover right">
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 @@ -495,6 +495,7 @@ exports[`Exercise with question state data renders header icons with multiple ch
className="sc-iqcoie iCsHxN"
>
<a
aria-label="View topic in textbook"
className="sc-papXJ fAQnos"
href="https://openstax.org"
target="_blank"
Expand Down Expand Up @@ -534,6 +535,7 @@ exports[`Exercise with question state data renders header icons with multiple ch
</div>
</a>
<a
aria-label="Suggest a correction"
className="sc-papXJ fAQnos"
href="https://openstax.org"
target="_blank"
Expand Down Expand Up @@ -831,6 +833,7 @@ exports[`Exercise with question state data renders header icons with two-step ex
className="sc-iqcoie iCsHxN"
>
<a
aria-label="View topic in textbook"
className="sc-papXJ fAQnos"
href="https://openstax.org"
target="_blank"
Expand Down Expand Up @@ -870,6 +873,7 @@ exports[`Exercise with question state data renders header icons with two-step ex
</div>
</a>
<a
aria-label="Suggest a correction"
className="sc-papXJ fAQnos"
href="https://openstax.org"
target="_blank"
Expand Down Expand Up @@ -909,6 +913,7 @@ exports[`Exercise with question state data renders header icons with two-step ex
</div>
</a>
<div
aria-label="In a two-step question, OpenStax asks for your own answer first, then gives multiple-choice options to help you assess your learnings. Recalling the answer to a question from memory helps you to retain things longer."
className="sc-papXJ fAQnos"
>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ exports[`ExerciseIcons matches snapshot 1`] = `
className="sc-hKMtZM gYevhA"
>
<a
aria-label="View topic in textbook"
className="sc-bczRLJ kQJjcU"
href="https://openstax.org"
target="_blank"
Expand Down Expand Up @@ -44,6 +45,7 @@ exports[`ExerciseIcons matches snapshot 1`] = `
</div>
</a>
<a
aria-label="Suggest a correction"
className="sc-bczRLJ kQJjcU"
href="https://openstax.org"
target="_blank"
Expand Down Expand Up @@ -83,6 +85,7 @@ exports[`ExerciseIcons matches snapshot 1`] = `
</div>
</a>
<div
aria-label="Select the best answer from the given list of distractors. Your instructor may or may not allow multiple attempts."
className="sc-bczRLJ kQJjcU"
>
<div
Expand Down
Loading