nl-kat-coordination icon indicating copy to clipboard operation
nl-kat-coordination copied to clipboard

Notifications should be in the main content block and deduplicated

Open Donnype opened this issue 1 year ago • 0 comments

The original issue was the following for the findings page:

Image

After which the discussion started where to actually render the notifications. It would be nice to have decide upon a place to render these. We partly have a generic solution: the header.html that includes partials/notifications/confirmation.html is imported in most templates. Some templates however such as the findings_list.html also rendered the notifications separately (we need to check the other templates as well, e.g. by searching for {% include 'partials/notifications/notifications_block.html' %}).

If we want to use the generic solution everywhere, we need to update it for accessibility. This is because the notifications are now rendered between a <header> and a <main> block:

Image

For accessibility we want to render it within the main block. To fix this generically would require either changing the base.html to render notifications (bad solution) or add another template layer like base.html for views that include our header.html, to define a

section there and render the notifications (better solution, but depends on how specific the rendering will be).

If we need to have more flexibility in rendering notifications, we might want to switch to a setup where each page decides where to render the notifications themselves.

Donnype avatar Mar 20 '23 15:03 Donnype