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

Improve search UX in the default template #3411

Open
rastapopougros opened this issue Dec 16, 2022 · 0 comments
Open

Improve search UX in the default template #3411

rastapopougros opened this issue Dec 16, 2022 · 0 comments

Comments

@rastapopougros
Copy link

The current search input opens a box with the results while typing with no control, and totally hide the page including the search input.

Mutiple UX/ergonomy/accessibility issues in consequence:

  • We do not have all the same ability and speed to type on a keyboard. While some of geeks can type a complete long word before the box opens, many other humans will only type few characters.
  • Once the box is open, impossible to continue to read what we was typing, so impossible to continue to type for most of humans. (as @jaapio was saying in the issue 🎨 Default template search is broken #3092: "Apart from the failing test I think we should have the search field in the search results dialog, as it is unexpected for the user to be able to type in a hidden field.")
  • There is no way to access the results page/box from another method (for ex direct access to a search in our dev softwares like selecting a word and "search into…"), because of lack of URL/query dynamic change, and no use of the URL after page load. It's always in best practices to provide direct URL access to such an important feature as the search.

Suggested improvements:

  • The search input must never be hidden, always accessible when displaying the results. The results must include the same search input, pre-fill with the same content we typed in the page, and with focus inside to continue/change. When we close the results, the focus must return to the input in the page.
  • At the same time the system detects that it can display the results or change the current results (if changes in the input box), the URL must be dynamically changed in accordance, with a query added like "?search=my_input_content".
  • When we close the results, the query in the URL must be removed.
  • During the loading of a page, IF the JS detects this same query param in the URL, then the system: 1) pre-fill the search input with the content of the query param + 2) displays the results for this request, in the same way as it does when we directly type.

With that, searching will be waaay more accessible for many kind of persons and usages. :)

@phpdoc-bot phpdoc-bot added this to Needs triage in phpDoc issue triage board Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
phpDoc issue triage board
  
Needs triage
Development

No branches or pull requests

1 participant