Use below code to get attached image title and alt.
//Get attachment title & alt...
$attachment_title="";
$attachment_alt="";
$args = array( 'post_type' => 'attachment', 'numberposts' => 1, 'post_status' => null, 'post_parent' => $post->ID, 'post_mime_type' => 'image');
$attachments = get_posts($args);
//If attachments exist...
if($attachments) {
//Loop until attachments...
foreach( $attachments as $attachment ) {
$attachment_title = $attachment->post_title;
$attachment_alt = get_post_meta($attachment->ID, '_wp_attachment_image_alt', true);
}
}
Hope this hope you well!