Note about title attributes in anchor tags
Created by: demeritcowboy
Separated out from https://github.com/civicrm/civicrm-dev-docs/pull/751
This might not make complete sense on its own without 751, but it seems difficult to get the wording for this part right so separating it out.
Merge request reports
Activity
101 101 ``` 102 102 103 For `title` attributes in `<a>` links, within CiviCRM these usually only appear in links that aren't within a larger block of text or where there is no clickable text, such as a datepicker icon. In this situation, the title text needs to be translated: 104 105 !!! failure "Bad" 106 107 ```smarty 108 {ts}<a href="https://www.example.org/civicrm/contact/view?cid=1" title="Go to the contact page">View Contact</a>{/ts} 109 ``` 110 111 !!! failure "Less bad" 112 113 ```smarty 114 <a href="https://www.example.org/civicrm/contact/view?cid=1" title="{ts}Go to the contact page{/ts}">{ts}View Contact{/ts}</a> 115 ``` 101 101 ``` 102 102 103 For `title` attributes in `<a>` links, within CiviCRM these usually only appear in links that aren't within a larger block of text or where there is no clickable text, such as a datepicker icon. In this situation, the title text needs to be translated: 104 105 !!! failure "Bad" 106 107 ```smarty 108 {ts}<a href="https://www.example.org/civicrm/contact/view?cid=1" title="Go to the contact page">View Contact</a>{/ts} 109 ``` 110 111 !!! failure "Less bad" 112 113 ```smarty 114 <a href="https://www.example.org/civicrm/contact/view?cid=1" title="{ts}Go to the contact page{/ts}">{ts}View Contact{/ts}</a> 115 ``` 101 101 ``` 102 102 103 For `title` attributes in `<a>` links, within CiviCRM these usually only appear in links that aren't within a larger block of text or where there is no clickable text, such as a datepicker icon. In this situation, the title text needs to be translated: 104 105 !!! failure "Bad" 106 107 ```smarty 108 {ts}<a href="https://www.example.org/civicrm/contact/view?cid=1" title="Go to the contact page">View Contact</a>{/ts} 109 ``` 110 111 !!! failure "Less bad" 112 113 ```smarty 114 <a href="https://www.example.org/civicrm/contact/view?cid=1" title="{ts}Go to the contact page{/ts}">{ts}View Contact{/ts}</a> 115 ``` 101 101 ``` 102 102 103 For `title` attributes in `<a>` links, within CiviCRM these usually only appear in links that aren't within a larger block of text or where there is no clickable text, such as a datepicker icon. In this situation, the title text needs to be translated: 104 105 !!! failure "Bad" 106 107 ```smarty 108 {ts}<a href="https://www.example.org/civicrm/contact/view?cid=1" title="Go to the contact page">View Contact</a>{/ts} 109 ``` 110 111 !!! failure "Less bad" 112 113 ```smarty 114 <a href="https://www.example.org/civicrm/contact/view?cid=1" title="{ts}Go to the contact page{/ts}">{ts}View Contact{/ts}</a> 115 ```
Please register or sign in to reply