VPR-104 fix(a11y): ClinicalScheduler, CMS, Computing, CAHFS accessibility (PR 6 of 6)#146
Conversation
There was a problem hiding this comment.
Pull request overview
This PR completes a set of accessibility fixes across ClinicalScheduler, CMS, Computing, and CAHFS, primarily improving keyboard/screen-reader behavior during navigation and on interactive card elements.
Changes:
- Added route-change focus management (
useRouteFocus) to multiple area routers to ensure focus moves on navigation. - Improved ClinicalScheduler keyboard/screen-reader support (removed invalid
aria-controls; added button semantics + keyboard activation +aria-labeltoWeekCell). - Updated UI colors/text contrast in CMS and ClinicalScheduler (Quasar semantic colors; darker grey text).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| VueApp/src/Computing/router/index.ts | Hooks up useRouteFocus(router) after navigation. |
| VueApp/src/CMS/router/index.ts | Hooks up useRouteFocus(router) after navigation. |
| VueApp/src/CMS/pages/ManageLinkCollections.vue | Replaces non-semantic colors with positive/negative. |
| VueApp/src/ClinicalScheduler/router/index.ts | Hooks up useRouteFocus(router) after navigation. |
| VueApp/src/ClinicalScheduler/pages/ClinicalSchedulerHome.vue | Improves text contrast (text-grey-7 → text-grey-8). |
| VueApp/src/ClinicalScheduler/components/WeekCell.vue | Adds keyboard activation + aria-label for clickable week cards. |
| VueApp/src/ClinicalScheduler/components/SchedulerNavigation.vue | Removes invalid aria-controls attributes from route tabs. |
| VueApp/src/CAHFS/router/index.ts | Hooks up useRouteFocus(router) after navigation. |
7cf22ec to
c856893
Compare
…lity (PR 6 of 6) - Fix C7: remove invalid aria-controls from SchedulerNavigation route tabs - Fix S10: add keyboard handlers to WeekCell clickable card (tabindex, role, aria-label, @keyup.enter/space) - Fix C4: add useRouteFocus to CMS, ClinicalScheduler, Computing, CAHFS routers - Fix M6: replace color="green"→"positive", color="red-5"→"negative" in CMS - Fix S8: text-grey-7→text-grey-8 on ClinicalSchedulerHome card descriptions - Axe-core verified: zero code-fixable violations on all 4 areas
- Use grey-4 background for unselected chips in RecentSelections to provide visual distinction from card background - Add role and aria-hidden to ScheduleBanner and ClinicalSchedulerHome banner for screen reader accessibility
- Fix ScheduleLegend and WeekCell contrast colors - Add tab fade prevention to schedule views - Fix CMS Link color, add Computing page title
c856893 to
bd470b4
Compare
| :class="cardClasses" | ||
| clickable | ||
| tabindex="0" | ||
| role="group" |
There was a problem hiding this comment.
The card is interactive (click + keyboard handlers) but is given role="group". This role doesn’t convey that the element is actionable to assistive tech and also overrides Quasar’s default semantics for clickable. Consider removing the explicit role or switching it to role="button" (and keeping the aria-label) so the announced role matches the behavior.
| role="group" | |
| role="button" |
| @keyup.enter.self.prevent="handleClick" | ||
| @keyup.space.self.prevent="handleClick" |
There was a problem hiding this comment.
Keyboard activation is handled on keyup, including Space. For non-native buttons, Space’s default page scroll typically occurs on keydown, so preventing only keyup may not stop scrolling and can make activation unreliable. Prefer handling Enter/Space on keydown (and preventDefault there) to align with ARIA button behavior.
| @keyup.enter.self.prevent="handleClick" | |
| @keyup.space.self.prevent="handleClick" | |
| @keydown.enter.self.prevent="handleClick" | |
| @keydown.space.self.prevent="handleClick" |
| -webkit-text-stroke: 1px var(--ucdavis-black-80); | ||
| paint-order: stroke fill; |
There was a problem hiding this comment.
-webkit-text-stroke is non-standard and isn’t supported in Firefox for font-based icons, so the contrast ‘outline’ may not appear for a portion of users. Consider a more cross-browser approach (e.g., text-shadow outline, swapping to an outlined SVG/icon variant, or adding a contrasting background) so the WCAG contrast improvement applies consistently.
| -webkit-text-stroke: 1px var(--ucdavis-black-80); | |
| paint-order: stroke fill; | |
| text-shadow: | |
| -1px 0 0 var(--ucdavis-black-80), | |
| 1px 0 0 var(--ucdavis-black-80), | |
| 0 -1px 0 var(--ucdavis-black-80), | |
| 0 1px 0 var(--ucdavis-black-80), | |
| -1px -1px 0 var(--ucdavis-black-80), | |
| 1px -1px 0 var(--ucdavis-black-80), | |
| -1px 1px 0 var(--ucdavis-black-80), | |
| 1px 1px 0 var(--ucdavis-black-80); |
| } | ||
|
|
||
| /* Dark outline on gold star icon for WCAG contrast on white backgrounds */ | ||
| .legend-star-outlined { |
There was a problem hiding this comment.
Same cross-browser concern here: -webkit-text-stroke won’t apply in Firefox for font icons, so the star may still fail contrast there. Consider a more broadly supported outlining technique (e.g., text-shadow) or a different icon treatment that maintains contrast across browsers.
| .legend-star-outlined { | |
| .legend-star-outlined { | |
| /* Cross-browser fallback for icon/text outlining, including Firefox */ | |
| text-shadow: | |
| -1px 0 0 var(--ucdavis-black-80), | |
| 1px 0 0 var(--ucdavis-black-80), | |
| 0 -1px 0 var(--ucdavis-black-80), | |
| 0 1px 0 var(--ucdavis-black-80), | |
| -1px -1px 0 var(--ucdavis-black-80), | |
| 1px -1px 0 var(--ucdavis-black-80), | |
| -1px 1px 0 var(--ucdavis-black-80), | |
| 1px 1px 0 var(--ucdavis-black-80); |
| tabindex="0" | ||
| role="group" | ||
| :aria-label="`Week ${week.weekNumber} starting ${formatDate(week.dateStart)}, ${assignments.length} ${inflect('assignment', assignments.length)}`" | ||
| @click="handleClick" | ||
| @keyup.enter.self.prevent="handleClick" | ||
| @keyup.space.self.prevent="handleClick" |
There was a problem hiding this comment.
WeekCell’s new keyboard interaction (Enter/Space activation on the card) is important a11y behavior but isn’t covered by tests. Given the existing Vitest suite under VueApp/src/ClinicalScheduler/__tests__, consider adding a component test that verifies keyboard activation triggers the same emit/click behavior and that Space does not scroll the page (preventDefault).
ClinicalScheduler, CMS, Computing, CAHFS accessibility — PR 6 of 6 in the VPR-104 accessibility audit.
ARIA & Keyboard
aria-controlsfrom SchedulerNavigation route tabs (4.1.2 Name, Role, Value)Route Focus
useRouteFocusto CMS, ClinicalScheduler, Computing, CAHFS routers (2.4.3 Focus Order)Document titles (2.4.2 Page Titled)
ViewData["Title"]to ComputingIndex.cshtmlColor Contrast (1.4.3 Contrast (Minimum))
color="green"→"positive",color="red-5"→"negative"in CMStext-grey-7→text-grey-8on ClinicalSchedulerHome card descriptionsBanner roles
role="status"/ accessible class pattern to ClinicalScheduler banners so status changes are announced