Skip to content

VPR-104 fix(a11y): Students and Directory accessibility improvements (PR 5 of 6)#140

Open
rlorenzo wants to merge 12 commits intomainfrom
VPR-104-accessibility-audit-Students-Directory
Open

VPR-104 fix(a11y): Students and Directory accessibility improvements (PR 5 of 6)#140
rlorenzo wants to merge 12 commits intomainfrom
VPR-104-accessibility-audit-Students-Directory

Conversation

@rlorenzo
Copy link
Copy Markdown
Contributor

@rlorenzo rlorenzo commented Apr 1, 2026

Alt Text

  • Fix C1: add descriptive alt text to student photos in PhotoList, StudentPhotoCard, StudentPhotoDialog, StudentClassYear, StudentClassYearImport (1.1.1 Non-text Content)
  • Add alt text to student photos in Razor views: StudentClassYear.cshtml, StudentClassYearImport.cshtml, Directory Card.cshtml (1.1.1 Non-text Content)

Heading Hierarchy

  • Fix C5: h2 → h1 on StudentsHome, StudentClassYear, StudentClassYearImport, Directory Card and Table views (Vue + Razor) (1.3.1 Info and Relationships)
  • Fix C5: replace invalid heading hierarchy in Directory Card.cshtml (h5→h1→h2→h3→h4) with semantic div classes (1.3.1 Info and Relationships)

Document titles (2.4.2 Page Titled)

  • Add ViewData["Title"] to all Students Razor views (Index, StudentClassYear, StudentClassYearImport)

Route Focus

  • Fix C4: add route focus management via useRouteFocus composable in Students router (2.4.3 Focus Order)

Icon-Only Buttons (4.1.2 Name, Role, Value)

  • Fix S6: add aria-label to PhotoGallery view toggle buttons (Grid View, List View, Print Sheet)
  • Directory Card: add aria-label to all 8 icon-only action links (User Info, Email, Emulate, AAUD Check, ID Check, MSO, UCPath, Alt Photo) — labels include the user's name for context so screen readers announce who the action targets
  • Directory Table: add aria-label to person / emulate icon buttons

Directory photo fallback

  • Replace raw <img> in Directory Card/Table with <q-img> + #error slot showing a grey placeholder with a person icon. Previously, when photos failed to load (mixed-content blocking on the HTTP photo endpoint), the browser rendered the alt text at default font size inside the 87px avatar, producing overflowing text

Empty table column labels (1.3.1 Info and Relationships)

  • Directory Table.cshtml: descriptive labels ("Photo", "IDs", "Detail", "Actions") on previously empty column headers
  • StudentClassYear.cshtml: "Photo" label on the avatar column

ARIA Roles

Color Contrast (1.4.3 Contrast (Minimum))

  • Fix S8: text-greytext-grey-8 on PhotoGallery empty state messages
  • StudentPhotoCard secondary text lines (e.g., team, track, rotation): text-grey (#9e9e9e, 2.7:1 on white — fails AA) → text-grey-7 (#757575, 4.6:1 — passes AA for small text)
  • Directory non-SVM card header: background #adb5bd#666 so white icons are actually visible; icon color default changed from invisible #a4b5c8 on grey to white, with SVM variant preserving the existing light-blue-on-dark-blue look
  • Directory email tooltip / aria-label now include @ucdavis.edu suffix for clarity

Brand Colors

  • Fix M6: replace off-brand Quasar colors with UC Davis semantic colors across StudentClassYear, Directory Card/Table (Vue + Razor) — red→negative, orange→warning, green→positive, blue→primary (1.4.3 Contrast (Minimum))
  • Directory toggles: "Search all of UCD" and "Display IDs" both use color="primary" (Aggie Blue) for visual consistency

StatusBanner Migration

CSS

  • Update directory.css to use class selectors instead of heading elements (supports C5 heading fix)

Cleanup

  • Remove dead debug toggle code in Directory Card.cshtml

Copilot AI review requested due to automatic review settings April 1, 2026 23:46
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is part of the VPR-104 accessibility workstream, improving Students and Directory UI accessibility by correcting heading structure, adding descriptive image alt text, improving control labeling, and adding route-change focus management.

Changes:

  • Add descriptive alt text for student/user photos across Vue PhotoGallery components and Students/Directory Razor views.
  • Promote key page headings from h2 to h1 and update Directory card markup/styles to avoid using heading tags for visual styling.
  • Add accessibility enhancements: aria-label on PhotoGallery view toggles, role="none" for non-clickable left-nav items, and route focus management via useRouteFocus.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
web/wwwroot/css/directory.css Switch Directory typography styling from heading selectors to semantic class selectors.
web/Areas/Students/Views/StudentClassYearImport.cshtml Promote page heading to h1; add bound alt text for student thumbnails.
web/Areas/Students/Views/StudentClassYear.cshtml Promote page heading to h1; add bound alt text for student avatars in table.
web/Areas/Directory/Views/Table.cshtml Promote page heading to h1.
web/Areas/Directory/Views/Card.cshtml Promote page heading to h1; replace card heading hierarchy with class-based elements; add alt text for profile image.
VueApp/src/Students/router/index.ts Register route-change focus management via useRouteFocus(router).
VueApp/src/Students/pages/StudentsHome.vue Promote page heading to h1.
VueApp/src/Students/pages/StudentClassYearImport.vue Promote page heading to h1; make student photo alt text descriptive.
VueApp/src/Students/pages/StudentClassYear.vue Promote page heading to h1; make student photo alt text descriptive.
VueApp/src/Students/pages/PhotoGallery.vue Add aria-label to view toggle buttons (grid/list/print).
VueApp/src/Students/components/PhotoGallery/StudentPhotoDialog.vue Add bound alt text for dialog image.
VueApp/src/Students/components/PhotoGallery/StudentPhotoCard.vue Add bound alt text for student photo card image.
VueApp/src/Students/components/PhotoGallery/PhotoList.vue Add bound alt text for list view images.
VueApp/src/layouts/LeftNav.vue Add role="none" for non-clickable nav items.

Comment thread web/Areas/Directory/Views/Card.cshtml Outdated
@rlorenzo rlorenzo force-pushed the VPR-104-accessibility-audit-Students-Directory branch 3 times, most recently from 9793a7d to a4a73dc Compare April 2, 2026 17:13
@rlorenzo rlorenzo requested a review from Copilot April 2, 2026 18:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Comment thread web/Areas/Directory/Views/Card.cshtml Outdated
Comment thread VueApp/src/Students/pages/PhotoGallery.vue
Comment thread VueApp/src/Students/pages/PhotoGallery.vue
@rlorenzo rlorenzo force-pushed the VPR-104-accessibility-audit-Students-Directory branch from 34e2deb to 45c4221 Compare April 3, 2026 18:59
@rlorenzo rlorenzo requested a review from Copilot April 3, 2026 19:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Comment thread web/Areas/Students/Views/StudentClassYear.cshtml
Comment thread web/Areas/Students/Views/StudentClassYearImport.cshtml Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Comment thread web/wwwroot/css/directory.css Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.

@rlorenzo rlorenzo force-pushed the VPR-104-accessibility-audit-Students-Directory branch 5 times, most recently from a225431 to daa856a Compare April 10, 2026 16:08
@rlorenzo rlorenzo requested a review from Copilot April 11, 2026 04:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Comment thread web/Areas/Directory/Views/Card.cshtml Outdated
Comment thread web/Areas/Directory/Views/Card.cshtml Outdated
…(PR 5 of 6)

- Fix C1: add descriptive alt text to student photos in PhotoList,
  StudentPhotoCard, StudentPhotoDialog, StudentClassYear, StudentClassYearImport
- Fix C5: h2 → h1 on StudentsHome, StudentClassYear, StudentClassYearImport,
  Directory Card and Table views
- Fix C5: replace invalid heading hierarchy in Directory Card.cshtml
  (h5→h1→h2→h3→h4) with semantic div classes
- Fix S6: add aria-label to PhotoGallery view toggle buttons
- Fix S11: add role="none" to non-clickable LeftNav q-items
- Add route focus management via useRouteFocus composable
- Update directory.css to use class selectors instead of heading elements
- Add alt text to student photos in Razor views
… Students+Directory

- Replace color="red" with color="negative" (Merlot) on delete button and Ross badges
- Replace color="orange" with color="warning" text-color="dark" on left-reason badges
- Replace color="green" with color="positive" on Directory search toggles
- Replace color="blue" with color="primary" on Directory ID toggles
- Migrate 2 error banners in PhotoGallery to StatusBanner component
- Fix text-grey contrast in PhotoGallery empty states (text-grey → text-grey-8)
- Remove commented-out debug toggle from Directory Card view
- Axe-core verified: zero violations on all 4 routes
- Add ViewData["Title"] to Students Razor views
- Add accessible label to avatar table column
Directory (Card.cshtml, Table.cshtml):
- Add aria-label to all icon-only action links (User Info, Email,
  Emulate, AAUD Check, ID Check, MSO, UCPath, Alt Photo) including
  the user's name for context
- Replace raw <img> with q-img + error slot to avoid broken-image
  alt text overflow when photos fail to load
- Descriptive column labels (Photo, IDs, Detail, Actions)
- Match toggle colors (primary for both Search all of UCD and
  Display IDs)
- Email tooltip includes @ucdavis.edu

Directory CSS (directory.css):
- Non-SVM card header background changed to dark grey (#666) so
  white icons have proper contrast; light grey bg was invisible
- Icon color defaults to white; SVM variant keeps existing light
  blue for consistency on dark blue header

StudentPhotoCard:
- Use text-grey-7 (#757575, 4.6:1 on white) for secondary text
  lines instead of the failing text-grey (#9e9e9e, 2.7:1)
@rlorenzo rlorenzo force-pushed the VPR-104-accessibility-audit-Students-Directory branch from daa856a to fb75859 Compare April 13, 2026 02:03
@rlorenzo rlorenzo requested a review from Copilot April 13, 2026 02:39
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Comment thread web/Areas/Directory/Views/Card.cshtml Outdated
Comment thread web/Areas/Directory/Views/Card.cshtml Outdated
Remove duplicate v-if on ID Check anchor and fix Alt. Photo URL,
which referenced an undefined props.row.mailId in the v-for scope,
was missing `=` after iamID, and passed an unencoded user.name.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Comment thread web/Areas/Directory/Views/Table.cshtml Outdated
QImg has no `props` prop — passing the QTable slot props object
rendered it as a stringified attribute on the DOM.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Comment thread web/Areas/Directory/Views/Card.cshtml Outdated
Comment thread web/Areas/Directory/Views/Card.cshtml Outdated
Comment thread web/Areas/Directory/Views/Card.cshtml Outdated
AAUD/ID/MSO links were gated only on the `ids` toggle, but when
results come from the LDAP-only path (UCD search), mothraId,
loginId, or mailId can be empty, producing malformed URLs.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Comment thread web/Areas/Directory/Views/Card.cshtml Outdated
Replace the non-existent user.currentAffiliate check with gates on
the iamId / mailId fields that the URL actually consumes. Apply
the same iamID= / encodeURIComponent fixes to the Table view as
were already applied to the Card view.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Comment thread web/Areas/Students/Views/StudentClassYearImport.cshtml
The hard-coded prod host broke the photo in non-prod environments.
Matches the helper-based pattern already used in StudentClassYear.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Comment thread web/Areas/Directory/Views/Table.cshtml
Comment thread web/Areas/Directory/Views/Card.cshtml
- StudentClassYear: add "Photo" header to avatar column, add
  q-mr-sm between class year buttons so the duplicate-year
  rows don't abut.
- PhotoGallery list view: set role="none" on the q-item inside
  q-td so Quasar's implicit listitem role doesn't trip the
  aria-required-parent axe rule (the q-item is being used as
  a layout primitive, not a real list item).
@rlorenzo rlorenzo requested a review from Copilot April 13, 2026 19:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.

Base automatically changed from VPR-104-accessibility-audit-base to main April 13, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants