-
Notifications
You must be signed in to change notification settings - Fork 713
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
Issue 10255 improve coach tabs accessibility #11501
Conversation
Hi @MisRob Could you please review the code? |
Build Artifacts
|
Hi @muditchoudhary, thank you! I will have a look some time this week |
Sure! |
There was a problem hiding this 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:
However, it should stay visible, in the same way it stays visible when I press enter on Quizzes tab here, for example:
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" |
There was a problem hiding this comment.
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.
@radinamatic I will invite you to test as soon as we arrive at a final version |
8aeb135
to
3c11757
Compare
Hi @MisRob I fixed the ring issue. Could you please check the PR? Thanks!! |
Thanks @muditchoudhary, it's looking great! I will re-review some time next week. |
@muditchoudhary Meanwhile, if you could fix linting, that'd be good |
Sure! I forgot to run the lint command before the push |
okay |
There was a problem hiding this 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'; |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
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"
Thank you!! The code and files are organized well and easy to read + great documentation. That is why I can understand it. |
There was a problem hiding this 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.
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. |
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. |
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
PR process
Reviewer checklist
yarn
andpip
)