Skip to content

[SE-710] Audit work package, backlogs, boards and meetings pages with AXe - #25846

Merged
myabc merged 9 commits into
devfrom
feature/se-659-audit-pages-with-axe-scan
Oct 22, 2026
Merged

myabc merged 9 commits into
devfrom
feature/se-659-audit-pages-with-axe-scan

Conversation

@myabc

@myabc myabc commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Ticket

https://community.openproject.org/wp/SE-710

What are you trying to accomplish?

Scans a first batch of pages with axe in their feature specs and fixes what the scans found: work packages index and show, backlogs editing, boards index and management, meetings index and agenda. Sister PR #25892 did the same for Lookbook component previews. Parent feature: SE-659.

Every scan so far had to stay inside #content. The modal overlay in the base layout keeps its CDK focus trap enabled on every page, and the trap's hidden anchor elements carry aria-hidden="true" with tabindex="0", failing the aria-hidden-focus rule on every page. The first commit binds the trap to the active modal, so the specs on this branch scan the whole page.

What approach did you choose and why?

Axe assertions sit in the existing feature specs for each page, so the pages render with the realistic data already set up there. A crawl-based sweep over demo data with a known-violations registry is a separate follow-up, SE-712; this PR stays per-page.

The focus trap fix leaves the overlay's role="dialog" markup unchanged; it is display: none while idle, so assistive tech never reaches it. Only the always-visible anchors needed to stop being tabbable. The nine axe specs written before this PR keep their #content scoping until SE-711 drops it.

AI involvement

Collaborative – AI generated a substantial part of the code; I reviewed and understand every line.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@myabc myabc changed the title [SE-659] Audit pages with AXe scan" [SE-659] Audit pages with AXe scan Oct 6, 2026
@bsatarnejad bsatarnejad self-assigned this Oct 6, 2026
@github-actions github-actions Bot added the ai: Collaborative 💻 AI generated a substantial part of the code; A human reviewed and understands every line. label Oct 6, 2026
@myabc myabc added spec coverage Pull requests that primarily update specs – with few or no production changes and removed ai: Collaborative 💻 AI generated a substantial part of the code; A human reviewed and understands every line. labels Oct 6, 2026
@bsatarnejad
bsatarnejad force-pushed the feature/se-659-audit-pages-with-axe-scan branch from d4bfb3b to e292880 Compare October 6, 2026 14:20
@github-actions github-actions Bot added the ai: Collaborative 💻 AI generated a substantial part of the code; A human reviewed and understands every line. label Oct 6, 2026
@myabc
myabc force-pushed the feature/se-659-audit-pages-with-axe-scan branch from e292880 to c054ae2 Compare October 7, 2026 16:11
@myabc
myabc force-pushed the feature/se-659-audit-pages-with-axe-scan branch 4 times, most recently from bf1992b to 2448f2c Compare October 16, 2026 20:18
@myabc
myabc marked this pull request as ready for review October 16, 2026 20:22
@github-actions

Copy link
Copy Markdown

Warning

Flaky specs

  • rspec ./spec/features/admin/departments_spec.rb[1:2:3]
  • rspec ./spec/features/work_packages/automations/automations_spec.rb[1:6:1]
🤖 Ask Copilot to investigate

Copy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer.

@copilot The following spec(s) are flaky in CI (first seen on PR #25846, linked for reference only):

- `rspec ./spec/features/admin/departments_spec.rb[1:2:3]`
- `rspec ./spec/features/work_packages/automations/automations_spec.rb[1:6:1]`

Treat this as a standalone task, unrelated to PR #25846. Create a new branch from origin/dev and open a new pull request targeting dev — do not stack it on PR #25846 or reuse that branch.

Follow the playbook in docs/development/testing/handling-flaky-tests/README.md to find the root cause and fix the underlying race — do not skip, delete, or weaken the spec to make it pass; disabling is a last resort per the playbook, and only with a bug ticket. Verify the fix by running the spec(s) repeatedly (e.g. `script/bulk_run_rspec --run-count 10`).

If you cannot reproduce the flake or are not confident in a fix after reasonable investigation, do not fabricate a change or skip the spec to force CI green. Instead, leave the pull request in draft and document what you tried, the suspected cause, and any leads in its description, then assign @myabc to take over.

Once the fix is verified, title the PR after the spec(s) it fixes, and use the PR description to explain the root cause, how the change resolves it, and the before/after results. Label the PR `flaky-spec`, assign @myabc, and request a review from @myabc.
On every commit, set @myabc as the sole co-author with a `Co-authored-by:` trailer (use their GitHub no-reply email so it links to their account), so it is traceable who dispatched the fix.

@myabc myabc changed the title [SE-659] Audit pages with AXe scan [SE-710] Audit pages with AXe scan Oct 18, 2026
@myabc myabc changed the title [SE-710] Audit pages with AXe scan [SE-710] Audit work package, backlogs, boards and meetings pages with AXe Oct 18, 2026
@myabc
myabc requested a review from a team October 18, 2026 11:20
@myabc
myabc added this pull request to stack #26116 October 18, 2026 15:14
Comment thread app/views/layouts/base.html.erb Outdated
myabc added 4 commits October 22, 2026 11:25
The modal overlay is rendered in the base layout on every page with
cdkTrapFocus always enabled. Angular CDK inserts two visually hidden
anchor divs next to the overlay carrying aria-hidden="true" and
tabindex="0", which trips the axe rule aria-hidden-focus on every
page and forces the accessibility specs to scope their scan to
#content.

Binds the trap to the active modal instance so the anchors carry no
tabindex while no modal is open. The CDK re-adds tabindex="0" as soon
as a modal opens.

https://community.openproject.org/wp/SE-710
@myabc
myabc force-pushed the feature/se-659-audit-pages-with-axe-scan branch from 2448f2c to 9c956f9 Compare October 22, 2026 10:26
@myabc
myabc requested a review from bsatarnejad October 22, 2026 10:28
myabc and others added 5 commits October 22, 2026 11:32
Restores the `<th>` for the drag handle column. As a `<td>` it made
Chrome expose the neighbouring `<th>` cells as `rowheader`, which broke
every `have_columnheader` assertion on the work package table, and it
shifted the `th:nth-of-type` positions the a11y sort spec relies on.

Labels the cell with visually hidden text instead, so that AXe's
`empty-table-header` rule still passes. The column spec now counts
four named headers.
The specs added on this branch scoped the axe scan to #content to
dodge the focus trap anchors of the always-present modal overlay.
With the trap disabled while no modal is open, the scan can cover the
whole page, including header, sidebar and global menus.

https://community.openproject.org/wp/SE-710
The screen reader description for links opening a new tab sat directly
under body, outside every landmark. With whole-page axe scans the
region rule flags it on every page.

Moves the span into #content, just before the hidden content heading.
The heading must stay directly before #content-body, which takes its
top padding from the .accessibility-helper + #content-body rule on
pages without a content header. The links reference the span by id,
so its position does not matter to them.

https://community.openproject.org/wp/SE-710
The user menu button gets its accessible name from the avatar, which
Angular renders after page load. An axe scan that runs before that
sees an unnamed button and fails the button-name rule, as happened on
the boards index spec in CI.

Gives the button the same aria-label the icon variant already carries,
and lets the boards index and backlogs specs wait for their page
content before scanning.

https://community.openproject.org/wp/SE-710
@myabc
myabc force-pushed the feature/se-659-audit-pages-with-axe-scan branch from 9c956f9 to 3a7f915 Compare October 22, 2026 10:32
@myabc
myabc merged commit 951812c into dev Oct 22, 2026
23 checks passed
@myabc
myabc deleted the feature/se-659-audit-pages-with-axe-scan branch October 22, 2026 11:44
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Accessibility ai: Collaborative 💻 AI generated a substantial part of the code; A human reviewed and understands every line. feature needs review spec coverage Pull requests that primarily update specs – with few or no production changes

Development

Successfully merging this pull request may close these issues.

2 participants