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: Use HTML <details> element instead of Javascript #44000

Open
ghost opened this issue Jan 30, 2021 · 8 comments · May be fixed by golang/website#35
Open

x/website: Use HTML <details> element instead of Javascript #44000

ghost opened this issue Jan 30, 2021 · 8 comments · May be fixed by golang/website#35

Comments

@ghost
Copy link

@ghost ghost commented Jan 30, 2021

No description provided.

@gopherbot gopherbot added this to the Unreleased milestone Jan 30, 2021
@mdlayher
Copy link
Member

@mdlayher mdlayher commented Jan 30, 2021

What exactly are you asking for? Can you clarify?

@ghost
Copy link
Author

@ghost ghost commented Jan 30, 2021

There are those widgets which can be opened and closed like example codes in pkg documentation. It would be nice if those are done using HTML details element instead of custom widget via Javascript thus making the webpage more useable without Javascript.

Another thing can be done is to make those example codes visible when Javascript isn't available.

@seankhliao

This comment has been hidden.

@ghost

This comment has been hidden.

@seankhliao

This comment has been hidden.

@seankhliao
Copy link
Contributor

@seankhliao seankhliao commented Jan 30, 2021

@ghost
Copy link
Author

@ghost ghost commented Feb 1, 2021

@mdlayher Any more information?

@mdlayher
Copy link
Member

@mdlayher mdlayher commented Feb 1, 2021

I know nothing about modern frontend development and just asked for clarifying details for others who might.

matoous added a commit to matoous/website that referenced this issue Feb 7, 2021
Use html details element instead of divs and javascript
to handle togglable parts of the page. This makes
the website more friendly to users with disabled
javascript, simplifies the html, and allows us to
remove a few lines of code from the javascript.

changes:
* use details + summary elements instead of togglable
  divs
* adjust the relevant javascript code that handled
  toggling and automatic opening of togglable divs
  based on url hash

Fixes: golang/go#44000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants