Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant metadata from Twitter plugin as it can use Open Graph properties as fall back #131

Merged
merged 1 commit into from
Sep 4, 2017

Conversation

hvelarde
Copy link
Member

@hvelarde hvelarde commented Sep 1, 2017

closes #112

The following changes were also implemented:

  • Twitter widgets now respect users' privacy via implementation of the 'twitter:dnt' property.
  • Tweet Button code was updated to use current best practices.
  • plugin code was cleaned up and refactored; it must be faster now and consume less memory.

Note that 'data-lang' attribute was removed as Twitter must be able to discover the content language automatically.

More information:

data-text here/Title;">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<noscript>
<a tal:attributes="href view/urlnoscript">Tweet</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I vote to keep this fallback when there is no javascript available (screen readers will thank you)

Copy link
Member Author

@hvelarde hvelarde Sep 1, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's not needed: the associated <script> tag is no longer there.

Copy link
Member

@rodfersou rodfersou Sep 1, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still see a <script> tag (but with src attribute), and this was a feature that will break after this merge. People that could tweet with screen readers will not be able to do it anymore.

Copy link
Member

@rodfersou rodfersou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add fallback for screen readers

…h properties as fall back.

The following changes were also implemented:

* widgets now respect users' privacy via implementation of the 'twitter:dnt' property.

* Tweet Button code was updated to use current best practices.

* plugin code was cleaned up and refactored; it must be faster now and consume less memory.

Note that 'data-lang' attribute was removed as Twitter must be able to discover the content language automatically.

More information:
* https://dev.twitter.com/web/tweet-button
* https://dev.twitter.com/web/overview/privacy
@hvelarde hvelarde merged commit 5a46dc2 into master Sep 4, 2017
@hvelarde hvelarde deleted the issue_112 branch September 4, 2017 15:01
claytonc pushed a commit that referenced this pull request Sep 27, 2017
…h properties as fall back. (#131)

The following changes were also implemented:

* widgets now respect users' privacy via implementation of the 'twitter:dnt' property.

* Tweet Button code was updated to use current best practices.

* plugin code was cleaned up and refactored; it must be faster now and consume less memory.

Note that 'data-lang' attribute was removed as Twitter must be able to discover the content language automatically.

More information:
* https://dev.twitter.com/web/tweet-button
* https://dev.twitter.com/web/overview/privacy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove Twitter Cards redundant tags
2 participants