-
Notifications
You must be signed in to change notification settings - Fork 26
fix(accessibilite): accessibilité: ajout du bilan 2024 rendu accessible #6890
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
base: dev
Are you sure you want to change the base?
Conversation
revu-bot
left a comment
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.
This PR adds a new "Resume" component to display annual reports on the stats page. The implementation is functional but has several issues:
CRITICAL:
- Hardcoded data in production code (year, filename, file size) should be dynamic or configurable
- Missing accessibility: empty
imageAltprop violates WCAG guidelines
IMPORTANT:
- Snapshot test doesn't verify actual component behavior - it only captures HTML output
- No unit tests for the new Resume component
- Typo in image filename ("modeles-de-courriers" should likely be "modeles-de-courrier")
The changes follow the existing code style but need improvements in testability, accessibility, and data management.
| title={`Télécharger le bilan annuel de l’année ${year}`} | ||
| titleAs={`h3`} | ||
| detail={<p>Format PDF - {fileSizeMb}Mo</p>} | ||
| imageAlt={""} |
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.
CRITICAL - Accessibility violation: Empty imageAlt prop fails WCAG accessibility standards. All images must have meaningful alternative text for screen readers. Consider using a descriptive alt text like 'Icône de téléchargement de document PDF' or make this decorative by using aria-hidden="true" on the image if the download context is already clear from the title.
| imageAlt={""} | |
| imageAlt={"Icône de téléchargement de document PDF"} |
| enlargeLinkOrButton | ||
| imageSvg={false} | ||
| small | ||
| imageUrl={`/static/assets/img/modeles-de-courriers-download.svg`} |
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 - Potential typo: The filename contains 'modeles-de-courriers-download.svg' with 'courriers' (plural). Verify if this should be 'courrier' (singular) to match French grammar conventions, as 'modèle de courrier' is the standard form.
| imageUrl={`/static/assets/img/modeles-de-courriers-download.svg`} | |
| imageUrl={`/static/assets/img/modeles-de-courrier-download.svg`} |
|
revu-bot
left a comment
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.
An error occurred: Error processing line comments: GitHub API error (422): {"message":"Validation Failed","errors":[{"resource":"PullRequestReviewComment","code":"custom","field":"pull_request_review_thread.line","message":"could not be resolved"}],"documentation_url":"https://docs.github.com/rest/pulls/comments#create-a-review-comment-for-a-pull-request","status":"422"}. Comment params: path=packages/code-du-travail-frontend/src/modules/stats/index.tsx, line=11, startLine=6
|
🎉 Deployment for commit 399d43d : IngressesDocker images
|



No description provided.