Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically fill alt text field when user uploads a new image #10

Closed
3 tasks
jjroelofs opened this issue Aug 5, 2024 · 4 comments · Fixed by #14
Closed
3 tasks

Automatically fill alt text field when user uploads a new image #10

jjroelofs opened this issue Aug 5, 2024 · 4 comments · Fixed by #14

Comments

@jjroelofs
Copy link
Contributor

jjroelofs commented Aug 5, 2024

Why are we doing this work

This work aims to improve accessibility and user experience by ensuring that all images uploaded to the platform automatically have descriptive alt text. This feature leverages AI to generate accurate alt text, reducing the manual effort required by users and enhancing the accessibility of our content for visually impaired users.

image

Relevant links

Requirements

  • Deliver the PR as an update to our Recipes, possibly as part of the Image media recipe: DXPR CMS Image Media Type Recipe
  • Cover any place where images can be added to ensure comprehensive utility:
    1. Image fields in node forms
    2. /media/add/image
    3. Image uploads in CKEditor, etc.
  • Leverage the Drupal AI module to support swappable AI backends, avoiding vendor lock-in.
  • DXPR CMS should not require additional configuration after the installation wizard completes; any necessary configuration must be handled in a new profile step or inside our API Keys step if only setting up a key and service vendor is required.
  • If the client does not add an API key/backend pair during installation (the field should not be required), there will be no warnings or errors in the UI, except in the Status Report page where we will print a warning that automatic alt text generation is disabled and add a link to the page where the user can set it up.
  • The generated alt text should be automatically loaded as a field value inside the alt text form field in the image upload widget, with no additional UI for editing or updating the text.

Non-functional requirements

  • Documentation: Update user guides and API documentation to include details about the new alt text generation feature.
  • Feature flag: Implement a feature flag to enable or disable the automatic alt text generation.
  • Performance and Testing: Ensure the AI service does not significantly impact the image upload speed and conduct comprehensive testing to cover various image types and ensure accurate alt text generation.
@yautjacetanu
Copy link

Notes on phase 1 for this:

  • We will focus on image fields and the media field.
  • We will allow both a button press and automatic filling of the alt text fields.
  • Phase 1 will only support Anthropic Claude + OpenAI Chatgpt 4o easily in the wizard. (The AI module itself will allow for more in theory but these may require more work on the user's side. This isn't a problem right now as there are few models that support vision).

@ivanboring
Copy link
Collaborator

@jjroelofs would it be possible for me to be added so I can push a specific branch, to be able to create the pull request for you?

All the changes mentioned in the call should be done now - I have setup so your configuration is autogenerating alt texts, but that is easy to change in the recipe so buttons are shown.

@jjroelofs
Copy link
Contributor Author

@ivanboring added!

@ivanboring ivanboring mentioned this issue Aug 22, 2024
14 tasks
@ivanboring ivanboring linked a pull request Aug 22, 2024 that will close this issue
14 tasks
@ivanboring
Copy link
Collaborator

This was recently added to the recipes api - could it maybe be interesting for adding API keys on sites that only applies the recipe?

https://www.drupal.org/node/3470507

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 a pull request may close this issue.

3 participants