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

Web Share API images have optional title, but seem to be missing alt. #285

Open
cookiecrook opened this issue Oct 22, 2024 · 1 comment
Open

Comments

@cookiecrook
Copy link

Web Share API images have optional title, but seem to be missing alt.

shareButton.addEventListener("click", async () => {
  const file = new File(data, "some.png", { type: "image/png" });
  try {
    await navigator.share({
      title: "Example File",
      files: [file],
      alt: "Marcos??? 🧐"  // accessible text alternative for the image, equivalent to HTML alt attr
    });
  } catch (err) {
    console.error("Share failed:", err.message);
  }
});
@saschanaz
Copy link
Member

One would probably want alt description for each file. And a bigger issue is whether the OS sharing system supports alt or not (I don't see any support on Windows for example)

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

No branches or pull requests

2 participants