alphagov / government-frontend

Serves government pages on GOV.UK
https://docs.publishing.service.gov.uk/apps/government-frontend.html
MIT License
52 stars 17 forks source link

Proposal: Add native sharing to GOV.UK pages #2004

Open edent opened 3 years ago

edent commented 3 years ago

As a user, I want an easy way to share information from GOV.UK with other people, without having to download a PDF or print off a document.

The Web Share API allows users to easily share a website. This means that a site doesn't need to have a dozen social media logos, app icons, and external links on a site.

Click the share button and the user's device prompts them to share the URL with the apps they have on their own device.

Native web share is supported on all major mobile browsers - the majority of users on the site.

Because it is powered by JavaScript, it can use progressive enhancement. If navigator.canShare() returns true then the share button can be displayed on screen.

There is already a print button at the bottom of most HTML pages.

Print button on a website

The current crop of share buttons (see below) were implemented 7 years ago/

edent commented 3 years ago

Interestingly, the Parliamentary Petitions website has a couple of social media icons. The WhatsApp icon only shows up to mobile users. Social media icons for Facebook, Twitter, WhatsApp, and email

edent commented 3 years ago

Some consultation pages have links to share to Facebook and Twitter. Screenshot of a page with social sharing links.

edent commented 3 years ago

Blog posts also have Facebook, Twitter, LinkedIn, and Email. Screenshot of sharing links on a blog post.

edent commented 3 years ago

And other! This one with a WhatsApp URI. Screenshot of the WhatsApp icon.

DeanWanless commented 3 years ago

This will be a useful feature on the Energy Performance of Buildings Register. Some of the feedback that we're hearing from UR is that people are more likely to engage with their EPC certificate when they receive a link than if they receive a PDF attachment. Will be a helpful tool as we try to wean the industry off of dependency on PDF sharing. We're exploring sharing by email and maybe "copy URL to clipboard" as our options. Social sharing less of an issue around Energy Assessment.