Repository navigation
Description
Description
I want to propose an Interop 2027 investigation to make Web Share testable on the desktop platforms used by Interop.
The Web Share API allows a page to send selected text, URLs, or files to the user's sharing mechanism. The investigation would establish a reliable automated test selection for input checks, user interaction requirements, inactive pages, permission rules, and how calls complete or fail. It would also set out how to test the handover to the operating system's share interface.
Web Share Target is outside this scope. The existing 2027 proposal #1404 concerns registering an installed web app to receive shared content through the manifest's share_target member. This proposal concerns the sending API, navigator.share() and navigator.canShare().
Specification and existing tests
Rationale
This revisits the Interop 2026 Web Share proposal #1083 and directly addresses the testing difficulty raised in earlier reviews.
The Interop 2025 feedback identified desktop testing as a blocker. A later review comment emphasized OS differences and the importance of Linux, where the reviewer reported that Chrome and Firefox lacked support in the relevant testing environment.
Current MDN compatibility data records basic sharing in Chromium and Safari, Firefox desktop support behind a preference, and no Firefox file-sharing support. Those entries do not resolve whether native sharing and automation work on the exact OS configurations used for Interop. The old proposal's blanket statement that Chrome lacks share() and canShare() should not be repeated.
For applications sharing a generated image, document, or selected URL, a download or copy-link fallback does not provide the same destination-selection workflow. However, API availability alone cannot prove that a receiving application uses every field in a payload. We need to check the browser's behavior, the handover to the operating system, and the receiving app separately.
Existing WPT makes the testing problem concrete. share-url-invalid.https.html checks rejected URLs after the test tool supplies a user action. share-consume-activation.https.html checks that a share call uses up that user action even when the URL is invalid. By contrast, share-sharePromise-internal-slot.https.html initiates a share and tests rejection of further calls while the first is still pending. Its ordinary filename does not establish that it can run unattended without the operating system's share dialog getting in the way.
Mozilla's standards-position issue was reopened and its positive label removed pending resolution of conflicting concerns. This proposal does not assume a settled endorsement or a shipping commitment.
Reasons for including the feature
- Developer survey evidence: In the State of HTML 2024 survey, 16.9% of respondents to the Web Share question reported having used it. This shows actual experience among surveyed developers. It is not a measurement of the percentage of websites using the API, or a vote for this Interop proposal.
- A real site and library fallback: Nigel O'Toole's Share URL component uses Web Share when available and otherwise copies the URL to the clipboard. The author documents its use on that site's own footer. This is a concrete example of maintaining two sharing paths because the API is not always available; it is not a fresh test of that site's behavior in every browser.
- A specific missing browser feature: Firefox bug 1635700 tracks sharing files through Web Share and remains open. The related Android report 1794931 describes failure to share an image and was closed as a duplicate of that implementation bug. The duplicate was not a separate fix.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTodo
Activity