Skip to content

Alt Text Management#5027

Open
ajrbyers wants to merge 24 commits intomasterfrom
al-text-manager
Open

Alt Text Management#5027
ajrbyers wants to merge 24 commits intomasterfrom
al-text-manager

Conversation

@ajrbyers
Copy link
Member

@ajrbyers ajrbyers commented Oct 31, 2025

Closes #3943
Closes #3938

This PR introduces a new pattern for HTMX functionality in Janeway. There's a new partial_views.py module specifically for HTMX endpoints, separate from regular views. Partial templates live in /appname/partials/. This keeps HTMX-specific code isolated rather than mixing it into existing views and templates, hopefully this will make it easier to find and maintain as we add more interactive features.

Throughout the admin - article image management, journal settings, issue pages - there's now an "Edit alt text" button. Click it and you get an HTMX powered modal that lets you add or update alt text without page reloads. The modal itself is a reusable base template that other features can extend.

Note: This PR adds a new builtin templatetag (see janeway_global_settings.py and if this has been copied to settings.py this will need to be updated.

@ajrbyers ajrbyers changed the title WIP WIP: Alt Text Management Oct 31, 2025
@ajrbyers ajrbyers changed the title WIP: Alt Text Management Alt Text Management Jan 29, 2026
@ajrbyers ajrbyers requested a review from mauromsl January 29, 2026 15:28
@mauromsl mauromsl assigned StephDriver and unassigned mauromsl Mar 11, 2026
@mauromsl mauromsl requested a review from StephDriver March 11, 2026 18:10
Copy link
Member

@StephDriver StephDriver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General reaction 🥳 💃 🍹

But some small specific niggles:

1. security wrapper not working (as per discussion).

Notes from the UI manager/settings/images

2. some images that show up in the journal image settings, don't have edit alt text options,

but there is no explanation as to why - so this will confuse users. In this example, the default large image has a button, but the press image override does not. The favicon and default profile image similarly have no alt-text button on my install.

Image

3. The alt text is saved on the "save alt text" button in the popup, but there is also a 'submit' button at the end of the page.

Users may think they've saved changes they haven't - File changes are only actioned on submit, making it possible here to select a file, edit alt text and save it, then click away from teh page without submitting (the submit button may be off screen at bottom of page) and only have saved the alt text, while the file has not actually been added.

Users may think they have undone changes that have actually been saved - the alt text edit popup once saved is saved, users are not warned that there is no way to undo a mistake here and they are accustomed to being able to click back off a page to cancel their edits.

4. As page links to the documentation, that documentation either needs to be updated to include alt-text instructions, or there needs to be a second link to additional instruction on this new alt-text functionality.

Image

Other

5. Profile image missing 'edit alt text' option

/profile/ one can upload a profile image, but no edit alt text button.

6. Issues page cannot load

Image
{% get_alt_text obj=issue file_path=issue.cover_image.url as alt_text %} 

7. Likewise collections

Invalid block tag on line 20: 'get_alt_text', expected 'empty' or 'endfor'. Did you forget to register or load this tag?

alt="{% get_alt_text obj=collection file_path=collection.hero_image_url default=collection.issue_title|striptags %}"

8. likewise homepage

... this continued I can't find a front of house page that might use one of these alt-texts that will load.

I don't think I can really look at much more right now, until the errors are sorted out.

One final thought - I can't work out where on the Press manager this alt-text fits. Is this work covering press?

@StephDriver
Copy link
Member

alt not coming through for journal logo in header on homepage, but fine on article page ?!?

image image

@StephDriver
Copy link
Member

StephDriver commented Mar 12, 2026

OLH article loading fine, but material and clean have same error:

Error during template rendering
In template /janeway/src/themes/clean/templates/journal/article.html, error at line 24

The 'large_image' attribute has no file associated with it.

alt=" {% get_alt_text obj=article.large_image_file file_path=article.issue.large_image.url default=article.title|striptags %} ">

@StephDriver StephDriver removed their assignment Mar 12, 2026
@ajrbyers ajrbyers assigned StephDriver and unassigned ajrbyers Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

image missing a text alternative [page header] image missing a text alternative [issue covers]

3 participants