Adding alt text to a form field I know that alt text is usually used for images, to help screen readers etc. In this case my task manager wants me to add 'alternative text' to calendar items, to better satisfy 508 requirements. This would be for a custom content type called Event, which is called up in a view. The alt text would be entered by a user, and may or may not link to anything. I'm just trying to create a field that is wrapped in an alt tag, so it doesn't display but screen readers will find it.  I've tried different things, such as adding dummy text into the .tpl file for calendar item, but I can't come up with a good variable for $title that works. I've tried using a php print statement in the .tpl but again, haven't found the right code. I'm thinking I will probably have to do surgery on the custom event module itself, which has a form for people to enter in the event data.  One solution is to use hook_form_alter to add in some code, something like this: 

function events_form_alter(&amp;$form_state, $form_id) {
    if ($form_id == 'events_form') {
        &lt;?php print $title . "text"; ?&gt;
    }
 }

One thing is that I think the best place to find an event title variable is in an include file, where most of the module code lives. I can see #title being used in the include, but not sure what that is. A local variable?  How can I use that variable to print in my alt text?  I'm hoping I can use this variable in a hook_form_alter function that prints a statement using this title. From the include file: 

    // Add an end and a date repeat form element, if needed.
if ($element ['#bundle'] == 'event') {
    if($element['#field_name'] == 'field_event_times_combined') {
        $element ['#title'] = t ( 'Date &amp; Time' );
    }


But all this is close to exceeding my PHP skills, however. Does anybody have any general insight? 

Many thanks
I don't think your approach will work, adding the new "alt" field to the edit/add form is only a small part of the task. Where and how you save the data? Instead, create a new field via the manage field section. Then you can use theme_preprocess or a tlp/twig file to change the output.