I'm trying to create a way that the title="" attribute can be automatically generated based on what the site maintainer enters into the Title field for the link. This came up because we are using the Link module to add homepages or other links to various profiles on our site, but not all of these links will be homepages, so it would be misleading to have the title="" be something like "[node:title]'s Homepage."

This is particularly an issue when it comes to accessibility when using the Formatter "Short, as link with the title "Link"" in Views. "Link" is handy because it can keep our table column narrow, but when I took a training with a university's disability services office awhile back they said that that can be very misleading to blind and low-vision visitors to the website, so the title="" attribute should specify what the page the link goes to is.

I'm aware that we can enter the title="" attribute manually, however I would like it to be automated so that it can be as easy as possible for the maintainers that will be entering the data into the 200+ nodes we will be adding with this type of link.

Is there already a token for the Title field? Or is there an easy way to do this myself? I'm still new to Drupal and don't know any PHP, so step-by-step help would be kindly appreciated. Thank you.

Comments

Thambos’s picture

Any ideas on how to do this? We will soon be entering the 200+ nodes using this field and it would be handy to know how to do this. Thank you in advance.