Skip to content

Fix accessibility issues on student report page - #1706

Merged
bnmnetp merged 5 commits into
RunestoneInteractive:mainfrom
ascholerChemeketa:studentreport-a11y
Nov 25, 2026
Merged

bnmnetp merged 5 commits into
RunestoneInteractive:mainfrom
ascholerChemeketa:studentreport-a11y

Conversation

@ascholerChemeketa

Copy link
Copy Markdown
Contributor

Fixes accessibility issues on student report page.

Also has two generic fixes for pages that share the same template. One allows the main .container to shrink in mobile view. The other fixes a reused id in 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:

  • Redesigned the student report page (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]
  • Refactored the book completion UI to use collapsible <details> for chapters and lists for subchapters, with status markers and improved handling of empty chapters.
  • Improved the grades and recent activity tables with accessible headers, N/A handling, and keyboard/ARIA support. [1] [2]

Student Report CSS Overhaul:

  • Updated studentreport.css for 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:

  • Updated _build_chapter_progress in student.py to 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:

  • Added aria-hidden="true" to all decorative icons in _navbar.html for improved screen reader experience. Updated dropdown IDs for better accessibility and fixed some markup inconsistencies. [1] [2]

Other improvements:

  • The student report page title now includes the student's name and course for clarity. (F063c3f3L12R12)
  • The JavaScript for expanding/collapsing chapters was removed in favor of semantic HTML <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.

ascholerChemeketa and others added 4 commits November 24, 2026 17:14
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>
Copilot AI balanced review requested due to automatic review settings November 25, 2026 01:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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>
Copilot AI balanced review requested due to automatic review settings November 25, 2026 01:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues require resolution for the student-report, navigation, and chapter-completion changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@bnmnetp
bnmnetp merged commit ed01421 into RunestoneInteractive:main Nov 25, 2026
2 checks passed
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.

3 participants