The page title names the page and not the instance: it should read Postulo > Dashboard #196
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Postulo/postulo#196
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Observation
A browser tab, the history, a bookmark and a screen reader's page announcement all read
the
<title>, and on every page of Postulo it is the page's name alone: Dashboard,Your details, Companies. Nothing says which application, or which instance, the tab
belongs to. With two Postulo instances open, or Postulo beside anything else, the tabs are
indistinguishable.
It should carry the instance's name, as Postulo > Dashboard — the name first, then the
page.
What is there today
templates/base.html:14:The block is the whole title. Fifty-eight templates override it, and every one replaces
the instance name rather than adding to it —
core/dashboard.html:6is{% block title %}{% translate "Dashboard" %}{% endblock %}, and so on. The only pageswhose title names the instance are the ones that do not override the block at all
(
core/home.htmlrenders{{ instance_name }}by hand).instance_nameis already in every template's context (core/context_processors.py:55)and already falls back to Postulo when the administrator has set nothing
(
core/site.py:215); the same name is what the web-app manifest and the MFA adapter use.So the value is there; the base template just does not put it round the block.
Twelve titles already carry a suffix of their own, with a middle dot:
Invitations · Server settings, API tokens · Settings, Your data · Settings. Whatever
separator the instance name takes has to sit beside that one without the title reading
Postulo > API tokens · Settings as three levels of something. Either the section joins
with the same separator, or the section suffixes go.
The two error pages are outside
base.html:500.html:6hard-codesSomething went wrong — Postulo, with a dash and the name last, and
403.html/404.htmloverride the block like everybody else.What a fix has to settle
base.htmlrather than in fifty-eight templates:<title>{{ instance_name }} > {% block title %}…{% endblock %}</title>, with the homepage's own override (
home.html:4) no longer needed, and a page with an empty blockyielding the bare name rather than a trailing separator.
page first so a narrow tab shows what differs, and a screen reader announces the
changing part first; name-first is a legitimate choice, and this issue asks for it, but
it is the choice to write down.
>is what was asked for; the existing suffixes use·. One conventionfor both levels.
translationof nothing: the name is the administrator's and the page names arealready translated; only the separator is new, and a separator is not a string to
translate.
titleblock, so a page added later cannot lose thename again — the shape
tests/test_page_coverage.pyalready uses to walk every URL.