redesign
redesign copied to clipboard
Some features fail non-gracefully without Javascript
- Do you want to request a feature or report a bug? Bug
- What is the current behavior? A number of features fail non-gracefully if Javascript does not run. A few of these that I noticed include:
- "Get the book" buttons do nothing when clicked
- "Get tickets" buttons take the user to an infinite loading animation
- Membership/login page is an infinite loading animation
- Typing something in the search bar and pressing Enter simply reloads the page and does not search
- All articles show as having 0 comments
- Table of contents is empty
- If the current behavior is a bug, please provide the steps to reproduce. Disable Javascript in the browser and try the above actions
- What is the expected behavior?
- The broken features (i.e. "get the book", "get tickets," membership page, search) should either degrade gracefully or display a message stating that JS is required to use those features.
- Instead of incorrectly showing 0 comments, either don't display any comment info without JS or display a message that JS is required to view comments
- Non-essential enhancements (e.g. table of contents for articles, if that has to be generated client-side) should be totally hidden instead of left empty if JS doesn’t run
- Please mention your operating system version and the version of your browser MacOS 10.12.3, Safari 10.0.3
Dear @daprice — all great points! But doesn't search degrade gracefully to Google search?
@vitalyfriedman Not when I test it. With JS disabled it looks like I still see the form with ID js-search-form, which doesn’t have an action attribute, so submitting it just reloads the current page with the query appended to the url, e.g. https://next.smashingmagazine.com/?q=test&sitesearch=smashingmagazine.com&submit=Search.
I tested this in both Safari 10.0.3 and Firefox Developer Edition 54. Here are my exact steps:
- Disable JS in the browser (from the Develop menu in Safari or the Developer Toolbox Options in Firefox)
- Navigate to next.smashingmagazine.com
- Click into the “Search Smashing” field near the top of the page (when inspected, this has the ID
js-search-input) - Type a query and press Enter