Skip to content

Added alt text to the graph and timetable images in the export modal - #1854

Open
danielrafailov wants to merge 1 commit into
Courseography:masterfrom
danielrafailov:export-image-alt-text
Open

danielrafailov wants to merge 1 commit into
Courseography:masterfrom
danielrafailov:export-image-alt-text

Conversation

@danielrafailov

@danielrafailov danielrafailov commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Proposed Changes

The alt text for the exported image, split into its own PR as you suggested when I first outlined the graph accessibility work. Before this change, the preview image in the export modal had no alt attribute, on both the Graph and Grid pages, so VoiceOver skipped over it entirely. A screen reader user opening Export wouldn't know there was a preview at all, let alone what it showed or which session's timetable it was.

Changes:

  • export.tsx:
    • The graph image has the alt text "Exported image of your course graph".
    • The timetable image's alt text names the session shown, e.g. "Exported image of your Fall timetable", and updates when switching sessions.
    • The session comes from a new imageSession state, which is set when a timetable image loads, and is passed to GridImage as a new session prop.
  • Tests (ExportModal.test.js): the graph image's alt text, the timetable image's alt text for its session, and that switching sessions updates it (to Spring and back to Fall).

I tested with VoiceOver on both pages, including switching sessions. Nothing changes visually.

Screenshots of your changes (if applicable)

Chrome Accessibility pane for the exported graph image, before the change (no alt, so it has no name and VoiceOver skips it):
Screenshot 2026-12-02 at 9 03 19 PM
VoiceOver on the exported graph image, after the change:
Screenshot 2026-12-02 at 8 47 43 PM
Chrome Accessibility pane for the exported timetable image, before the change (no alt, so it has no name and VoiceOver skips it):
Screenshot 2026-12-02 at 9 04 20 PM
VoiceOver on the exported timetable image, after the change:
Screenshot 2026-12-02 at 8 48 01 PM
VoiceOver on the exported timetable image after switching sessions, after the change:
Screenshot 2026-12-02 at 8 48 22 PM

Type of Change

(Write an X or a brief description next to the type or types that best describe your changes.)

Type Applies?
🚨 Breaking change (fix or feature that would cause existing functionality to change)
✨ New feature (non-breaking change that adds functionality) X
🐛 Bug fix (non-breaking change that fixes an issue)
🎨 User interface change (change to user interface; provide screenshots)
♻️ Refactoring (internal change to codebase, without changing functionality)
🚦 Test update (change that only adds or modifies tests)
📦 Dependency update (change that updates a dependency)
🔧 Internal (change that only affects developers or continuous integration)

Checklist

(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the [ ] into a [x] in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)

Before opening your pull request:

  • I have performed a self-review of my changes.
    • Check that all changed files included in this pull request are intentional changes.
    • Check that all changes are relevant to the purpose of this pull request, as described above.
  • I have added tests for my changes, if applicable.
    • This is required for all bug fixes and new features.
  • I have updated the project documentation, if applicable.
    • This is required for new features.
  • If this is my first contribution, I have added myself to the list of contributors.
  • I have updated the project Changelog (this is required for all changes).

After opening your pull request:

  • I have verified that the CI checks have passed.
  • I have reviewed the test coverage changes reported by Coveralls.
  • I have requested a review from a project maintainer.

Questions and Comments

  • The alt text describes the image as a whole rather than listing the courses in it. The courses are already readable elsewhere on the page (the graph itself, or the timetable grid), and the graph's courses will get their own descriptions in the per-node descriptions PR. I can add a list of the selected courses to the alt text if you'd find that useful.
  • This only covers the preview in the modal. The downloaded PDF and calendar files aren't affected, since alt text only exists in the page's HTML.

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 47014301793

Coverage increased (+0.05%) to 63.347%

Details

  • Coverage increased (+0.05%) from the base build.
  • Patch coverage: 2 of 2 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 4349
Covered Lines: 2799
Line Coverage: 64.36%
Relevant Branches: 1023
Covered Branches: 604
Branch Coverage: 59.04%
Branches in Coverage %: Yes
Coverage Strength: 155.63 hits per line

💛 - Coveralls

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