Repository navigation
Fix accessibility issues on student report page - #1706
Merged
bnmnetp merged 5 commits intoNov 25, 2026
Merged
Conversation
main.css set `.container { width: 45em }`, which loads after rs-core.css
and overrode its `width: 100%`, so the container stayed 720px wide on
phones and the page scrolled sideways (WCAG 1.4.10 Reflow). Make 45em a
max-width instead; wide-screen layout is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every navbar link already has a visible text label, so the Tabler icon <i> elements are decorative. Mark the remaining ones aria-hidden so screen readers don't announce private-use glyphs. Also drop a stray </i> inside the Runestone News link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Chapters are native <details>/<summary>, so they open with Enter/Space and announce expanded/collapsed; the custom click JS is gone. - Completion status no longer relies on color alone: each chapter and section has a symbol (with a visual legend) and screen-reader text. Status colors darkened to meet 4.5:1, including on hover. - List every book subchapter, so a chapter no student has touched no longer expands to an empty list. A chapter is completed only when all of its subchapters are. - Section titles are real <h3> headings. Tables get names, column scope, and assignment row headers; the activity table gets a <thead>. - Scrolling boxes are named, focusable regions, so they can be scrolled from the keyboard outside Chrome. - Activity times render with course_datetime_tag (viewer's timezone) instead of raw UTC; long item ids wrap instead of being clipped. - Percent shows a %, N/A is read as "not available", the long course name in the h1 wraps, and the page title names the student and course. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The User and Help toggles both had id="navbarDropdown", so the Help menu's aria-labelledby resolved to the User toggle and screen readers named it "User". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The chapter and subchapter lists lose their semantics and item counts in Safari/VoiceOver because of list-style: none, requiring role="list" on both lists to preserve accessibility.
1 open issue
What changed in this PR
This PR improves the accessibility and mobile usability of Runestone’s student progress report, with shared layout and navigation fixes.
Changes:
- Replaces scripted chapter toggles with native disclosures and adds accessible status labels, table headers, and localized activity times.
- Lists all book subchapters and includes unstarted sections in chapter completion calculations, with updated tests.
- Allows shared containers to shrink on narrow screens and fixes navbar IDs and decorative icon markup.
| File | Description |
|---|---|
test/bases/rsptx/assignment_server_api/test_student_routes.py |
Tests complete subchapter listings and revised completion rollups. |
components/rsptx/templates/staticAssets/main.css |
Replaces fixed container width with a responsive maximum. |
components/rsptx/templates/staticAssets/css/studentreport.css |
Styles accessible disclosures, status markers, and wrapping text. |
components/rsptx/templates/assignment/student/studentreport.html |
Adds semantic report markup, keyboard-scrollable regions, and localized times. |
components/rsptx/templates/_navbar.html |
Hides decorative icons and gives the Help dropdown a unique ID. |
bases/rsptx/assignment_server_api/routers/student.py |
Includes unstarted subchapters when building progress summaries. |
Review effort: Balanced
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes accessibility issues on student report page.
Also has two generic fixes for pages that share the same template. One allows the main
.containerto shrink in mobile view. The other fixes a reusedidin the navbar.This pull request significantly improves the accessibility, usability, and clarity of the student progress report and navigation components. The main changes include a complete redesign of the student report page for better accessibility (including semantic HTML, ARIA labels, and screen reader support), visual and structural updates to the book completion and grades sections, and improved keyboard navigation. There are also minor accessibility improvements to the navigation bar and some backend logic changes to ensure all subchapters are displayed with accurate progress.
Student Report Page Accessibility and Usability Improvements:
studentreport.html) to use semantic HTML elements (<h3>,<ul>,<details>,<summary>,<th scope="col">), added ARIA labels, screen-reader-only text, and keyboard navigation for scrollable regions. The book completion section now uses a visual and text-based legend, and status is conveyed by color, symbol, and text for accessibility. (F063c3f3L12R12, [1] [2] [3]<details>for chapters and lists for subchapters, with status markers and improved handling of empty chapters.Student Report CSS Overhaul:
studentreport.cssfor improved layout, color contrast, wrapping of long text (like course names and activity IDs), and new styles for the redesigned book completion and legend. Removed unused styles and adapted to the new HTML structure. [1] [2] [3] [4] [5]Backend Progress Calculation Fix:
_build_chapter_progressinstudent.pyto ensure every subchapter in the book is listed in order, and subchapters with no progress are marked as not started. The logic for determining chapter status was clarified and made more robust. [1] [2]Navigation Bar Accessibility:
aria-hidden="true"to all decorative icons in_navbar.htmlfor improved screen reader experience. Updated dropdown IDs for better accessibility and fixed some markup inconsistencies. [1] [2]Other improvements:
<details>.These changes collectively make the student report page more accessible, easier to use, and visually clearer, while also improving backend data consistency and navigation accessibility.