From f19e9a0bfcc2ec74008d8b7b55fe8e48a102577c Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 9 Mar 2026 15:46:23 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Improve=20V2=20naviga?= =?UTF-8?q?tion=20and=20progress=20bar=20accessibility?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: godie <227743+godie@users.noreply.github.com> --- .Jules/palette.md | 4 ++ src/components/custom/CustomProgressBar.jsx | 14 ++++++- .../custom/CustomProgressBar.test.jsx | 38 +++++++++++++++++++ src/v2/components/V2Navi.jsx | 34 ++++++++++------- src/v2/pages/V2Examen.jsx | 20 +++++++--- src/v2/pages/V2Landing.jsx | 1 - 6 files changed, 89 insertions(+), 22 deletions(-) create mode 100644 src/components/custom/CustomProgressBar.test.jsx diff --git a/.Jules/palette.md b/.Jules/palette.md index ee2d8f0..c0a74ac 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -94,3 +94,7 @@ ## 2025-06-16 - [Functional Matchers for Complex Buttons and Utility-First Layout] **Learning:** React Testing Library's `findByText` can fail on buttons containing Materialize icons due to text node fragmentation and the icon's name being part of the `textContent`. Using a functional matcher that checks for partial content and tag name is more robust. Additionally, strictly adhering to utility classes (e.g., 'center-align') instead of inline styles ensures compliance with repository constraints and theme consistency. **Action:** Always use functional matchers for testing interactive elements with icons and avoid inline styles by leveraging existing CSS utility classes. + +## 2025-06-17 - [Accessible Progress Indicators and V2 Navigation Polish] +**Learning:** For progress indicators to be truly accessible, they must include `role="progressbar"` along with `aria-valuenow`, `aria-valuemin`, and `aria-valuemax` attributes, allowing screen readers to accurately report status. In side-navigation rails, ensuring decorative icons are marked with `aria-hidden="true"` and the active link has `aria-current="page"` significantly improves screen reader navigation. Additionally, maintaining localization consistency (e.g., 'Inicio' vs 'Home') in new UI versions (V2) is essential for a cohesive user experience. +**Action:** Always implement full ARIA attributes for progress components and audit new navigation structures for both accessibility markers and language consistency. diff --git a/src/components/custom/CustomProgressBar.jsx b/src/components/custom/CustomProgressBar.jsx index c2eb1c4..121330d 100644 --- a/src/components/custom/CustomProgressBar.jsx +++ b/src/components/custom/CustomProgressBar.jsx @@ -18,13 +18,22 @@ const CustomProgressBar = ({ wrapperColor = 'grey lighten-3', className = '', style = EMPTY_STYLE, - height + height, + 'aria-label': ariaLabel }) => { const isIndeterminate = progress === undefined || progress === null; const finalStyle = height ? { ...style, height } : style; return ( -
@@ -140,7 +148,7 @@ const V2Examen = () => { style={{ width: 'auto', padding: '0 32px', height: '56px', borderRadius: '16px' }} onClick={() => history.push('/v2/dashboard')} > - Siguiente Caso arrow_forward + Siguiente Caso arrow_forward