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

x/website/tour: add links to the Playground #62325

Open
Deleplace opened this issue Aug 28, 2023 · 3 comments
Open

x/website/tour: add links to the Playground #62325

Deleplace opened this issue Aug 28, 2023 · 3 comments
Labels
FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. website

Comments

@Deleplace
Copy link
Contributor

Deleplace commented Aug 28, 2023

Per #1437 and #62323, the Go Tour code box is not accessible to developers who are blind or visually impaired.

A mitigation would be to add a link in each lesson to the same code in the Playground, which is more accessible.

@gopherbot gopherbot added this to the Unreleased milestone Aug 28, 2023
@Deleplace
Copy link
Contributor Author

Implementation details

The code for the lessons doesn't live in the Playground. It lives in the Go Website repo, and all the lessons data is dynamically bundled as a JSON response.

3 approaches are possible to create ~100 links to the Playground:

a. Manually create ~100 links in the Playground, then commit them in the Website repo

This operation would also be needed for individual lessons, every time a lesson is modified or created.

b. Modify the Playground to accept snippet as URL parameter

Playground permalinks contain just an ID, e.g. https://go.dev/play/p/mlJaiM_fEX_Y

If the Playground also accepted the full text of a short program e.g. https://go.dev/play/z/package%20main%0A......., it would be straightforward to have the Tour create a link containing whatever is in the code box.

c. Automate the creation of ~100 links at Website build time

A script may "save" ~100 snippets in the Playground, receive the permalinks, and deploy the list of permalinks alongside the website.

Notes

  • a Playground permalink is "stable", as submitting the same full code twice produces the same permalink.
  • a Playground permalink is durable, entries don't automatically go away.

@Deleplace
Copy link
Contributor Author

cc @jamalc

@Deleplace
Copy link
Contributor Author

The need for a Playground link would become somewhat obsolete if/when #1437 is resolved with a proper accessible code editor.

@joedian joedian added website NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Aug 28, 2023
@hyangah hyangah modified the milestones: Unreleased, website/unplanned Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. website
Projects
None yet
Development

No branches or pull requests

4 participants