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

Issue 10255 improve coach tabs accessibility #11501

Conversation

muditchoudhary
Copy link
Contributor

@muditchoudhary muditchoudhary commented Nov 4, 2023

Summary

Use KDS tabs (KTabsList and KTabsPanel) in the Learners tab which is inside Coach->Reports->Learners->Select a learner.
Add new constants for the Learners tab inside tabsConstants.js

References

#10255

Reviewer guidance

To review

Go to Coach->Reports-Learners-Select a learner
For accessibility, use the keyboard and go to the Reports tab and then press the right arrow to move focus to the Activity tab. Press enter to open the focused tab.
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 Nov 4, 2023
@muditchoudhary
Copy link
Contributor Author

Hi @MisRob Could you please review the code?

@MisRob
Copy link
Member

MisRob commented Nov 6, 2023

Hi @muditchoudhary, thank you! I will have a look some time this week

@MisRob MisRob self-requested a review November 6, 2023 13:06
@muditchoudhary
Copy link
Contributor Author

will have a look some time this week

Sure!

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.

Hi @muditchoudhary, overall this is great work. Code changes make sense to me and I can confirm that the basic functionality works as expected.

At this point, I only see one thing to be tuned. Here, you can see that after I press enter on the Activity tab, the focus ring gets lost after the tab content gets loaded:

lost-focus

However, it should stay visible, in the same way it stays visible when I press enter on Quizzes tab here, for example:

focus

I assume that the problem is that the whole page gets reloaded after pressing enter and therefore the focus is lost. This is something I needed to deal in #10212 too. I prepared useCoachTabs.js utilities. You could read its documentation and then see in the codebase how it's used. This is a bit tricky part. Let me know if you needed anything.

<KTabsList
:tabsId="LEARNERS_TABS_ID"
:activeTabId="activeTabId"
ariaLabel="Coach learners"
Copy link
Member

Choose a reason for hiding this comment

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

"Coach learners" will need to be translated, similarly to how "coachString('reportsLabel')" is. Let me know if you needed some guidance in regards to translations.

@MisRob
Copy link
Member

MisRob commented Nov 8, 2023

@radinamatic I will invite you to test as soon as we arrive at a final version

@muditchoudhary muditchoudhary force-pushed the issue-10255-Improve-Coach-tabs-accessibility branch from 8aeb135 to 3c11757 Compare November 22, 2023 15:00
@muditchoudhary
Copy link
Contributor Author

muditchoudhary commented Nov 22, 2023

Hi @MisRob I fixed the ring issue. Could you please check the PR? Thanks!!
Peek 2023-11-22 20-32

@MisRob
Copy link
Member

MisRob commented Nov 24, 2023

Thanks @muditchoudhary, it's looking great! I will re-review some time next week.

@MisRob MisRob marked this pull request as ready for review November 24, 2023 09:09
@MisRob
Copy link
Member

MisRob commented Nov 24, 2023

@muditchoudhary Meanwhile, if you could fix linting, that'd be good

@MisRob MisRob self-requested a review November 24, 2023 09:10
@muditchoudhary
Copy link
Contributor Author

@muditchoudhary Meanwhile, if you could fix linting, that'd be good

Sure! I forgot to run the lint command before the push

@muditchoudhary
Copy link
Contributor Author

Thanks @muditchoudhary, it's looking great! I will re-review some time next week.

okay

@MisRob MisRob added the TODO: needs review Waiting for review label Nov 28, 2023
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.

Amazing work @muditchoudhary. This was lots of work and definitely not a trivial task due to how we do routing and you resolved it nearly on your own.

Code is okay. I left very minor comments, by no means anything blocking.

I also tested manually and can confirm that it works as expected. @radinamatic would you like to QA it or is my testing sufficient here as this targets develop?

@@ -19,3 +19,9 @@ export const ReportsGroupTabs = {
MEMBERS: 'tabMembers',
ACTIVITY: 'tabActivity',
};

export const LEARNERS_TABS_ID = 'reportLearners';
Copy link
Member

Choose a reason for hiding this comment

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

Just a nitpick, no change required. May be nice to follow the naming convention of other constants and use 'coachReportsLearners' as ID value.

// that this header was re-mounted as a result
// of navigation after clicking a tab (focus shouldn't
// be manipulated programatically in other cases, e.g.
// when visiting the Plan page for the first time)
Copy link
Member

Choose a reason for hiding this comment

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

Minor comment: "when visiting the Plan page" This is not the Plan page. I think that's result of copy-pasting, so perhaps we could just say "when visiting the page" to make future copies work without the need to adjust it

},
$trs: {
back: {
message: 'All learners',
context:
"Link that takes user back to the list of learners on the 'Reports' tab, from the individual learner's information page.",
},
reportLearners: {
message: 'Report learners',
context: 'Labels the Reports > Learners tab for screen reander users',
Copy link
Member

Choose a reason for hiding this comment

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

A little typo: "...screen reader"

@muditchoudhary
Copy link
Contributor Author

Amazing work @muditchoudhary. This was lots of work and definitely not a trivial task due to how we do routing and you resolved it nearly on your own.

Thank you!! The code and files are organized well and easy to read + great documentation. That is why I can understand it.

Copy link
Member

@pcenov pcenov left a comment

Choose a reason for hiding this comment

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

Thank you @muditchoudhary - I confirm that this is implemented as specified.

@marcellamaki marcellamaki merged commit 170b74f into learningequality:develop Nov 30, 2023
35 checks passed
@muditchoudhary
Copy link
Contributor Author

muditchoudhary commented Nov 30, 2023

Hello, @MisRob I forgot to tell to wait before merging the PR so I can resolve the minor fix too that you mentioned. Now since the branch is merged, I'll raise a new PR, hope that will be fine.

@MisRob
Copy link
Member

MisRob commented Nov 30, 2023

Ah I'm sorry about that @muditchoudhary. We are excited to have it merged, I guess :)! If you don't mind opening a new PR, please go ahead! Or you could also do it in your other work in progress - just adding a few commits, if that'd be easier.

@muditchoudhary
Copy link
Contributor Author

muditchoudhary commented Nov 30, 2023

Ah I'm sorry about that @muditchoudhary. We are excited to have it merged, I guess :)! If you don't mind opening a new PR, please go ahead! Or you could also do it in your other work in progress - just adding a few commits, if that'd be easier.

No issues for me. On my next PR I'll also include these. That would be easier for me.
Thanks

@muditchoudhary muditchoudhary deleted the issue-10255-Improve-Coach-tabs-accessibility branch December 1, 2023 14:07
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 TODO: needs review Waiting for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants