w3c / wai-statements

Accessibility Statements
https://w3c.github.io/wai-statements/planning/statements/
31 stars 61 forks source link

"Redirect" unknown hashes to a "page not found" like view for feedback #126

Open rvantonisse opened 5 years ago

rvantonisse commented 5 years ago

When using hashed urls without "create" or "preview" in it, the generator looks like it is not functioning (blank page).

Redirect all other hashed urls to a "Page not found" view

yatil commented 5 years ago

FWIW I think I would prefer to just load the main page as without hash instead – that is what happens on ”normal”, not JS-enhanced web pages when a fragment is not found.

basdebruin commented 3 years ago

Do we still want to add a "Page not found" view to the generator page? Right now the behaviour is in line with what @yatil proposed: whenever an unfamiliar hash is used, it defaults to the "Create Statement" page. In my opinion this is desired behaviour and this issue can be closed.

nitedog commented 3 years ago

It works partially. Here are directions to recreate the bug:

  1. Open new browser window with address https://www.w3.org/WAI/planning/statements/generator/#test
  2. It correctly defaults to "Create Statement" https://www.w3.org/WAI/planning/statements/generator/#create
  3. In the same session, change the hash "#create" to "#test" and press enter (not hard refresh)
  4. Bug: it displays empty "Generate an Accessibility Statement" page

Is this easy to fix (recognize that "Preview your accessibility statement" button was not pressed)?

nitedog commented 3 years ago

Another version of that bug:

  1. Open new browser with overview page https://www.w3.org/WAI/planning/statements/
  2. Select "Generator Tool" from the left navigation https://www.w3.org/WAI/planning/statements/generator/#create
  3. It correctly shows "Create Statement" by redirecting to https://www.w3.org/WAI/planning/statements/generator/#create
  4. Press back button in the browser
  5. Bug: it displays empty "Generate an Accessibility Statement" page
basdebruin commented 3 years ago

This issue should now be fixed, pushed as part of PR #150

The issue only seemed to appear on chrome, not safari and also affected the "Skip to Content" button at the top of the page. The generator now defaults to the main "create" page whenever the hash is changed to something unfamiliar.