Repository navigation
fix: give the grading scale handles and grade name fields accessible names - #3323
chanellebingham wants to merge 1 commit into
Conversation
|
Thanks for the pull request, @chanellebingham! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Submit a signed contributor agreement (CLA)
If you've signed an agreement in the past, you may need to re-sign. Once you've signed the CLA, please allow 1 business day for it to be processed. 🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
|
Hi @chanellebingham, thanks for the fixes! Could you please sign the CLA? |
|
Hi @bradenmacdonald, I've signed the CLA! :) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3323 +/- ##
=======================================
Coverage 96.30% 96.30%
=======================================
Files 1450 1450
Lines 35523 35530 +7
Branches 8510 8512 +2
=======================================
+ Hits 34209 34216 +7
Misses 1272 1272
Partials 42 42 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Hi @bradenmacdonald, quick one about the CLA: on the form I only put my first name, "Chanelle", instead of my full name, Chanelle Bingham, and I couldn't change it after submitting. The |
|
@mphilbrick211 could you please help @chanellebingham out ^ ? :) |
|
Thanks @bradenmacdonald! I'll get this CLA done PROPERLY this time 💀 |
Hi @chanellebingham! You can submit a new form here. Please make sure to include your full name, github username, and full address. Thanks! |
|
Thank you soooooooo much @bradenmacdonald & @mphilbrick211 !! CLA is signed. Again, thanks for that. :) Warm regards! |
|
Hi @chanellebingham! Your CLA should be all set. Sometimes it can take up to 24 hours to reflect in Github, but the check should turn green soon. |
|
@chanellebingham @bradenmacdonald re-running the checks might also help prompt the CLA check to go through. |
…names The handles between grade ranges are role="slider" buttons with no name, so a screen reader announced "slider, 50" without saying which cutoff it moves. The grade name fields had no label at all. Each handle is now named after the boundary it moves, using the grade names shown on the scale (e.g. "Boundary between A and B"), and each grade name field is labelled "Grade name". GradingScaleHandle is converted to TypeScript so the new prop doesn't need PropTypes. Fixes openedx#3232 Co-authored-by: Claude <claude@anthropic.com>
232b999 to
99a4482
Compare
bradenmacdonald
left a comment
There was a problem hiding this comment.
The fix looks good! Thanks :)
|
@mphilbrick211 I rebased the PR which triggered all the checks again, but the CLA check is still not passing, so I can't merge it. I also tried closing and re-opening the PR but that didn't work either. |
|
@bradenmacdonald & @mphilbrick211 Sorry, must have fat fingered that close button. So sorry! But I definitely have signed it. I am not sure if I have done something wrong on my end, but I made sure to fill everything out correctly, signed and dated the CLA. (sorry again about the muck around) |
|
It might just be delayed; we can check again on Monday. |
|
Thanks mate! Fingers crossed. |
Description
Fixes the two critical axe findings in the grade range editor on Settings → Grading (#3232):
button-name: the handles between grade ranges arerole="slider"buttons witharia-valuemin/max/nowbut no name, so a screen reader announced "slider, 50" without saying which cutoff it moves. Each handle is now named after the boundary it moves, using the grade names shown on the scale, e.g. "Boundary between A and B", or "Boundary between Pass and Fail" on the default range. The name follows the grade names, so renaming "B" to "Merit" makes it "Boundary between A and Merit".label: the grade name fields had no label, placeholder oraria-label. Each field is now labelled "Grade name".Both strings are new messages in
grading-scale/messages.ts, with descriptions for translators. The handle's name is built inGradingScale.jsx, which already holds the grade names, and passed toGradingScaleHandleas a newariaLabelprop.GradingScaleHandlewas converted from.jsxto.tsx, so the new prop is typed and its PropTypes are replaced by an interface.User roles affected: Course Author (and staff), particularly people using a screen reader or other assistive technology. There is no visual change, so before and after screenshots would look the same.
Supporting information
Testing instructions
Manual check (needs a running Open edX backend, e.g. Tutor):
aria-label="Boundary between <higher grade> and <lower grade>", e.g. "Boundary between Pass and Fail" on a new course.aria-label="Grade name".button-nameandlabelviolations from a11y (critical) - grading grade-range editor is unlabelled #3232 should be gone.These manual steps have not been run in a browser or with a screen reader for this PR. The checks below are automated only.
Automated checks run on this branch:
TZ=UTC npx fedx-scripts jest --coverage=false src/grading-settings/grading-scale/GradingScale.test.jsx: 14 passed. The 5 new tests fail without the fix (5 failed, 9 passed).TZ=UTC npx fedx-scripts jest --coverage=false src/grading-settings: 8 suites, 58 tests passed. Without the fix: 5 failed, 53 passed.aria-labelfails the 3 handle tests; removing either field'saria-labelfails its field test; shifting the handle-to-grade mapping by one fails the handle-name tests.button-nameandlabelrules only), run against the rendered component in jsdom: both rules reported critical violations before the change and none after, on a Pass/Fail scale and on an A/B/C scale.npm run types(tsc --noEmit): no errors.dprint checkandoxlint --type-aware --deny-warningson the changed files: clean.npm run i18n_extract: both new messages are extracted with their descriptions.Not run: the full
make validate(whole test suite and production build), andstylelint(no style changes).Other information
display: none) and disabled, because that boundary can't move. It also gets a name now, built the same way, which doesn't describe a real boundary (e.g. "Boundary between A and A"). Because it'sdisplay: none, it isn't exposed to assistive technology. Happy to leave it unnamed instead if you prefer.src/setupTest.jsreplaceswindow.getComputedStylefor the whole test suite, so nothing counts asdisplay: nonein tests. In a browser it is hidden, which matches the issue's count of onebutton-namenode per draggable boundary.Co-authored-by: Claude <claude@anthropic.com>.Best Practices Checklist
.ts,.tsx). (No new files.GradingScaleHandlewas converted from.jsxto.tsx.)propTypesanddefaultPropsin any new or modified code. (None added.GradingScaleHandle's PropTypes were replaced by a TypeScript interface.GradingScale.jsxkeeps the PropTypes and defaultProps it already had.)src/testUtils.tsx(specificallyinitializeMocks). (Not ticked: the new tests are in the existingGradingScale.test.jsxand reuse its existing setup,initializeMockAppplus anIntlProviderwrapper, rather thaninitializeMocks.)apiHooks.tsin this repo for examples. (No data loading changes.)messages.tsfiles have adescriptionfor translators to use.../in import paths. To import from parent folders, use@src, e.g.import { initializeMocks } from '@src/testUtils';instead offrom '../../../../testUtils'. (No../imports added.GradingScaleHandle.tsxandGradingScaleSegment.tsxkeep their existing../utilsand../messagesimports.)