fix: #3634878 Set the text direction of the AI-written name and alternative text from their content

Issue: https://www.drupal.org/project/ai_media/issues/3634878

On an Arabic page an English AI answer in the name or alternative text field was right-aligned with its full stop at the start. The AI-written name, alternative text and title inputs now carry dir="auto", so each follows its own text. Kernel test added; checked on Arabic pages on the add page and in the Media Library.

Before: on an Arabic page, the English alternative text is right to left, full stop first.

Before

After (one screenshot for #3634872, #3634873 and #3634878 together): the alternative text reads left to right.

After

AI-Generated: Yes

Checkpoints:

  • File an issue
  • Addition/Change/Update/Fix
  • Testing to ensure no regression
  • Automated unit testing coverage
  • Automated functional testing coverage
  • UX/UI designer responsibilities
  • Readability
  • Accessibility
  • Performance
  • Security
  • Developer Documentation
  • User Guide Documentation
  • Reviewed by human
  • Code review by maintainers
  • Full testing and approval
  • Credit contributors
  • Review with the product owner
  • Release notes snippet
  • Release

🤖 Generated with Claude Code

Edited by Rajab Natshah

Merge request reports

Loading
Loading