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

Improve Coach tabs accessibility for quiz report page #11588

Merged
merged 2 commits into from
Dec 14, 2023

Conversation

KshitijThareja
Copy link
Contributor

Summary

This PR aims to improve the coach tabs accessibility for the quiz report page with the use of KDS tabs (KTabsList and KTabsPanel) in the QUIZZES tab which is inside Coach->Reports->Quizzes->Select a quiz. The new constants for the quiz tab are defined in tabsConstants.js.

WorkingSample.mp4

References

Closes #10253

Reviewer guidance

  1. Go to Coach->Reports-Quizzes-Select a quiz
  2. For accessibility, use the keyboard and go to the Report tab and then press the right arrow to move focus to the Difficult Questions tab. Press enter to open the focused tab.
  3. For normal, use the mouse to click the respective tab to open.

Testing checklist

  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • Critical user journeys are covered by Gherkin stories
  • Critical and brittle code paths are covered by unit tests

PR process

  • PR has the correct target branch and milestone
  • PR has 'needs review' or 'work-in-progress' label
  • If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')
  • If this is an important user-facing change, PR or related issue has a 'changelog' label
  • If this includes an internal dependency change, a link to the diff is provided

Reviewer checklist

  • Automated test coverage is satisfactory
  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

@github-actions github-actions bot added APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) SIZE: medium labels Dec 5, 2023
@KshitijThareja
Copy link
Contributor Author

Hi @MisRob. I've made the PR targeting the release-v0.16.x branch, as discussed earlier. After the review is done, I can rebase it to the develop branch if required.
Thanks :)

@MisRob MisRob self-requested a review December 7, 2023 13:45
@MisRob
Copy link
Member

MisRob commented Dec 7, 2023

Thanks @KshitijThareja, great! I will review some time next week.

@@ -113,6 +157,12 @@
}
},
},
$trs: {
coachReportsQuizzes: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@radinamatic This a string that's used as aria-label for this tablist

Screenshot from 2023-12-13 15-21-12

I was thinking if "Coach reports quiz tabs" would make more sense?

Also I think we could improve the string context to say something like "Labels the quiz page tabs in the Coach > Reports > Quizzes"

I'd be grateful to hear from you before making a final suggestion to @KshitijThareja.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bigger issue here is that since the intention is to merge this into the 0.16 release, we cannot add new strings at this point, as there will be no translations for them available for this release.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally the tablist aria-label should say something like Report details, but we have nothing similar on Crowdin. Maybe just reusing the string Details that we do have in our code already, since this tablist is so deep into Coach and reports features that it would be specific enough.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah okay, I didn't realize this. Thanks @radinamatic. Yes, then let's go with the existing 'Details' string for now and I will open a follow-up issue for us to replace it with something better. @KshitijThareja The existing string is saved as detailsLabel defined in commonCoachStrings.js. Please use it instead of adding a new one. Thank you.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And just as a reminder: when writing strings to use in aria-labels for interactive elements, there is no need to include the type of the element as the screen reader already announces it. For example the tablist on the Coach home has the label Coach reports, and the NVDA screen reader announces it as:

Coach reports tab control

If you write the string for aria-label Coach reports quiz tabs as suggested above, NVDA would announce it as:

Coach reports quiz tabs tab control

To sum it up, no need to put the element type inside its aria-label, it is redundant 🙂

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️🙏🏻

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed the aria-label to use the detailsLabel from commonCoachStrings.js as asked 👍🏻

@MisRob
Copy link
Member

MisRob commented Dec 13, 2023

Hi @KshitijThareja, thanks, great work. I haven't notice any issues in code and I manually tested it as well. All worked as expected for me. Just leaving one note about a string. I'd like to hear from @radinamatic before we make the final tweak. I think that we can target the release branch if our QA team can test it out, please :)? @radinamatic @pcenov

@MisRob MisRob requested review from radinamatic and pcenov December 13, 2023 14:39
@KshitijThareja
Copy link
Contributor Author

Thanks @MisRob :)
I'll be happy to work on any further suggestions by the team.

@radinamatic
Copy link
Member

And I missed to confirm that the keyboard navigability on this page is working as intended 🙂
Good job, will approve! 👍🏽

@MisRob
Copy link
Member

MisRob commented Dec 14, 2023

Great! @KshitijThareja so the only required update is to re-use the existing string. We will then proceed to merge. Good work!

Copy link
Member

@radinamatic radinamatic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yey for more accessible tab controls in coach pages! 👏🏽

As soon as the label is corrected, this will be good to merge! 💯

@KshitijThareja
Copy link
Contributor Author

Thanks a lot @radinamatic @MisRob 😊
Will work on the suggested changes and update it as soon as possible.

Copy link
Member

@MisRob MisRob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MisRob MisRob merged commit c59891c into learningequality:release-v0.16.x Dec 14, 2023
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) SIZE: medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Coach tabs accessibility - "Report-Difficult questions" tabs on a Reports quiz page
3 participants