openedx / openedx/frontend-app-learning
a11y(serious): Course home headers nest buttons
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 70
- Forks
- 335
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 35
Description
Where: course home outline (${APPS}/learning/course/{course_key}/home), the
six collapsible section headers.
Finding: axe nested-interactive (serious, WCAG 2.2 AA) fails on all six:
target: li:nth-child(1) > .pgn_collapsible > .collapsible-trigger[role="button"]
html: <div class="collapsible-trigger" role="button" tabindex="0" aria-expanded="false">
why: Element has focusable descendants
A role="button" element is announced as a single control, so a screen-reader or
keyboard user is told "button" and then meets focusable content inside it that the
role does not account for — the inner controls are not reliably reachable, and the
outer control's purpose is ambiguous.
Suggested fix: make the header's clickable area a real <button> containing
only its label, with the section's links and controls as siblings rather than
descendants as Paragon does.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the course home outline route, ${APPS}/learning/course/{course_key}/home, and locate the six collapsible section headers. Reproduce the axe nested-interactive finding, then verify that the header control no longer contains the section's links or controls and that axe passes for all six headers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100