(ui) Highlight current navigation section
Mark the active primary or system navigation link with aria-current and a subtle visual state so staff users can see where they are in the control panel without making Admin a primary app route. Refs #37
This commit is contained in:
@@ -55,6 +55,15 @@ class ViewTests(TestCase):
|
||||
self.assertContains(response, reverse("changelog"))
|
||||
self.assertContains(response, "/api/status/")
|
||||
self.assertContains(response, reverse("admin:index"))
|
||||
self.assertContains(response, '<a href="/" aria-current="page">Dashboard</a>', html=False)
|
||||
|
||||
def test_base_navigation_marks_current_secondary_page(self) -> None:
|
||||
self.client.force_login(self.staff_user)
|
||||
|
||||
response = self.client.get(reverse("self_check"))
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertContains(response, f'<a href="{reverse("self_check")}" aria-current="page">Self Check</a>', html=False)
|
||||
|
||||
def test_changelog_requires_staff_login(self) -> None:
|
||||
response = self.client.get(reverse("changelog"))
|
||||
|
||||
Reference in New Issue
Block a user