Alt attribute is not showing while the value is given in Media

For post and page content, when an image is added from the media library an image tag is generated with the alt tag being whatever the alt text in the media library was when the image was inserted. Since the image is added as HTML with the alt tag, updating the alt text in the media libray won’t update it on the page (otherwise it would need to scan and update all your content whenever an image description is changed).

To change the alt text of an image you’ll need to edit the page it is on, and select and edit the image there. That will update the alt text in the page source.

For images output by templates or custom fields then the alt text might not be updating because the template was never coded to output the alt text. A template would need to get the alt text by using get_post_meta():

echo get_post_meta( $attachment_d, '_wp_attachment_image_alt', true);

Or by using the wp_get_attachment_image() function, which will include the alt text in its output:

echo wp_get_attachment_image( $attachment_id, 'full' );