Server settings: the sidebar marks no section as current on four People sub-pages #486

Closed
opened 2026-10-01 10:47:02 +00:00 by tiagoagueda · 0 comments
Owner

Found on 2026-09-29 in a read-only review of postulo at 95348908d, reading the Server settings sections and rendering each People sub-page with the test client.

Checked again on 2026-10-01 against main at 0a5cad587: still present. The code is now at core/templatetags/postulo.py:406-438 (_sidebar and server_sidebar) and tests/test_server_settings.py:55 (test_every_section_renders_inside_the_sidebar); core/server_sections.py and core/settings_sections.py have not changed, and the four pages still render no aria-current="page".

The People section tells the sidebar which pages belong to it through its match names. Two of those names, server:person_admin and server:person_active, are POST-only views that always redirect and never render a page, while the four pages that do render inside the Server settings frame for one account are not listed. On those four pages no sidebar entry is marked current: no aria-current="page" and no active style.

  • Where: core/server_sections.py:13-26, the people entry's match; read by SettingsSection.is_active in core/settings_sections.py:28 through _sidebar and server_sidebar in core/templatetags/postulo.py:425-457.
  • What happens: an administrator opens Change username, Recovery link, Delete account or Plugins for an account (server:person_username, server:person_recovery, server:person_delete, server:person_plugins). Each extends server/base.html and draws the sidebar, and each rendered with no aria-current="page" at all in the snapshot, where server:people renders one.
  • Why it matters: a screen reader user is not told where in Server settings the page sits, and a sighted user sees no section highlighted, on the pages where an administrator changes one person's account. The sub-pages of the other sections (server:email_test, server:record_of_processing, the invitation pages) are marked. test_every_section_renders_inside_the_sidebar in tests/test_server_settings.py:53 asserts one current entry, but only on each section's own page, so it cannot see this.
  • Fix: replace server:person_admin and server:person_active in the People match with server:person_username, server:person_recovery, server:person_delete and server:person_plugins.

Done when

  • A parametrised test in tests/test_server_settings.py renders each of the four person pages as an administrator and finds exactly one aria-current="page", on the People entry; it fails today with none.
Found on 2026-09-29 in a read-only review of postulo at 95348908d, reading the Server settings sections and rendering each People sub-page with the test client. Checked again on 2026-10-01 against `main` at `0a5cad587`: still present. The code is now at `core/templatetags/postulo.py:406-438` (`_sidebar` and `server_sidebar`) and `tests/test_server_settings.py:55` (`test_every_section_renders_inside_the_sidebar`); `core/server_sections.py` and `core/settings_sections.py` have not changed, and the four pages still render no `aria-current="page"`. The People section tells the sidebar which pages belong to it through its `match` names. Two of those names, `server:person_admin` and `server:person_active`, are POST-only views that always redirect and never render a page, while the four pages that do render inside the Server settings frame for one account are not listed. On those four pages no sidebar entry is marked current: no `aria-current="page"` and no active style. - **Where:** `core/server_sections.py:13-26`, the `people` entry's `match`; read by `SettingsSection.is_active` in `core/settings_sections.py:28` through `_sidebar` and `server_sidebar` in `core/templatetags/postulo.py:425-457`. - **What happens:** an administrator opens *Change username*, *Recovery link*, *Delete account* or *Plugins* for an account (`server:person_username`, `server:person_recovery`, `server:person_delete`, `server:person_plugins`). Each extends `server/base.html` and draws the sidebar, and each rendered with no `aria-current="page"` at all in the snapshot, where `server:people` renders one. - **Why it matters:** a screen reader user is not told where in Server settings the page sits, and a sighted user sees no section highlighted, on the pages where an administrator changes one person's account. The sub-pages of the other sections (`server:email_test`, `server:record_of_processing`, the invitation pages) are marked. `test_every_section_renders_inside_the_sidebar` in `tests/test_server_settings.py:53` asserts one current entry, but only on each section's own page, so it cannot see this. - **Fix:** replace `server:person_admin` and `server:person_active` in the People `match` with `server:person_username`, `server:person_recovery`, `server:person_delete` and `server:person_plugins`. ## Done when - A parametrised test in `tests/test_server_settings.py` renders each of the four person pages as an administrator and finds exactly one `aria-current="page"`, on the People entry; it fails today with none.
tiagoagueda added this to the 0.6.0 milestone 2026-10-01 10:47:02 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo#486
No description provided.