Click here to Skip to main content
15,919,931 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am adding a twitter widget on my webpage, the JavaScript generates code, but one of the items it generates is an iframe, but it contains no title, I want to add a title to that iframe. Without a title it does not pass accessibility tests.

Code installed on my website:

JavaScript
<a class="twitter-timeline" data-dnt="true" title="twitter-stuff" data-title="hello" data-chrome="nofooter noborders noheader transparent" href="https://twitter.com/CPPFES" data-widget-id="260502369362657280">Tweets by @CPPFES</a> </div>


JavaScript
<script type="text/javascript">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>



Part of the code that is generated when the page is run and need to add a title attribute to:

HTML
<iframe style="" id="rufous-sandbox" frameBorder="0" allowTransparency="-1" scrolling="no" allowtransparency="true"></iframe>
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900