- Issue created by @Anybody
- Open on Drupal.org →Core: 10.1.x + Environment: PHP 8.1 & MariaDB 10.3.22last update
over 1 year ago Not currently mergeable. - @anybody opened merge request.
- last update
over 1 year ago 11 pass - last update
over 1 year ago 10 pass, 1 fail - Status changed to Needs review
over 1 year ago 7:55pm 10 May 2023 - 🇩🇪Germany Anybody Porta Westfalica
Here we go! :)
Once 🐛 Fix failing test since Drupal 10.1.x Closed: outdated is merged, the test will work and the alt attribute will be placed correctly for all of the three image types.
- Status changed to Postponed
over 1 year ago 9:16pm 10 May 2023 - 🇩🇪Germany Anybody Porta Westfalica
Let's postpone this on the more important parent issue for now. Afterwards this will need a rebase to integrate.
- 🇷🇺Russia Chi
alt is not required as it has default value which is empty string.
The alternative text could be easily set via attribute parameter.
{{ drupal_image('public://ocean.jpg', {alt: "The ocean"}) }}
If we add a dedicated parameter for
alt
attribute then we have to do same for other attributes listed inimage_theme()
- width
- height
- title
I think it's better just copy the values from attribute array to top level.
Something like this$build['#alt'] = $attributes['alt'] ?? '';