Review main Merged

85997[TASK] Improve usability of search in workspaces

Ayke Halder CR +2 V +2 Easy +13 −9 updated 12/20/24, 15:07

Commit message

This changes the `disabled`-attribute of the workspaces'
search-submit-button. Thereby screen-readers can announce that the
button is disabled.

Before this there was toggling implemented for `class="disabled"`.
Thereby the 'disabled' button was still active and could be activated
by keyboard.

This also enables a proper reload if the user deletes all characters
from the search-field.
Before on emptying the search-field a reload was already triggered, but
the search-request still used the old non-empty search-string.

This triggers a reload on change of the search-field.
Before a user might have entered a search-string and then changed one
of the dropdowns. Thereby a reload was triggerd, that did not use the
new search-string, even though it was displayed in the search-field.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Andreas Kienast +1
  • Verified V +2 Done
    • Benni Mack +2
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 2226

Show 1 earlier messages
  1. Ayke Halder uploaded patch set 1 09/10/24, 20:36

  1. core-ci voted on patch set 1 V +1 09/10/24, 20:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65350

  2. Ayke Halder rebased onto patch set 2 V +1 11/15/24, 09:50

  3. core-ci voted on patch set 2 V +1 11/15/24, 09:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69468

  4. Benni Mack commented on patch set 2 V -1 11/15/24, 10:17

    Have you tested this change? By setting the "disabled" state on the submit button in general, the RegularEvent('input') is not triggered somehow in latest Chrome. Thus, the patch breaks current existing behavior that the search is working on hitting "enter" in the search field.
  5. Ayke Halder uploaded patch set 3 V +1 11/15/24, 15:04

  6. core-ci voted on patch set 3 V +1 11/15/24, 15:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69487

  7. Ayke Halder commented on patch set 3 11/15/24, 15:11

    Reply

    Same behaviour on Firefox: A `form` with disabled `button[type=submit]` is not send on enter. The actual issue here is: User clears input via keyboard by deleting the characters one-by-one. When search-field is empty, a proper reload should happen - identical to the behaviour of the `x`/clear-button. This reload-on-empty was already implemented and also a request to the server was sent. Unfortunately the old non-empty search-string was used for this request, rendering the actual request unneccessary. This is fixed now: The reload-on-empty uses an emoty search-string.
  8. Ayke Halder uploaded patch set 4 V +1 11/15/24, 15:35

  9. core-ci voted on patch set 4 V +1 11/15/24, 15:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69489

  10. Benni Mack commented on patch set 4 11/15/24, 20:19

    I tested this patch again. Albeit your previous reasoning might be right, and you've improved this situation, still the functionality now is broken for me. I use the keyboard, I enter something in the search field, I hit enter -> nothing happens, the search submit button is still disabled (literally all the time). Except for having "nothing" in there. Can you make sure your change works please, otherwise maybe mark the patch as WIP so I know I won't test it again until it's ready?
  11. Benni Mack commented on patch set 4 CR -1 11/15/24, 20:20

    or let me know if I should take over the patch
  12. Benni Mack commented on patch set 4 11/15/24, 20:20

    Also, you changed the commit message -> is this change now mainly about a11y or usability?
  13. Ayke Halder commented on patch set 4 11/19/24, 14:17

    Reply

    This patch was tested before. There the use-case for the 'empty field by character-deletion' slipped. But the `x`-/'clear'-button was tested and worked. Also the new change was tested. You mention some broken functionality: > I use the keyboard, I enter something in the search field, I hit enter -> nothing happens, the search submit button is still disabled (literally all the time). Except for having "nothing" in there. On which system/browser version can you reproduce this issue? I can unfortunatelly not reproduce it on Linux (Gnome Desktop) with: * Firefox Developer 133.0b8 * Chromium 120.0.6099.224 * Chromium 132.0.6821.2 (This change is about the search-field "Search term" of the workspace-module. e.g. https://typo3.cms.ddev.site/typo3/module/manage/workspaces?id=1&workspace=1 )

    Reply

    Same impact on a11y as before. Now additionally usability is a concern - which actually outweighs the a11y impact of this change. Maybe `Improve a11y and usability of search in workspaces` fits even better here?
  14. Andreas Kienast commented on patch set 4 11/22/24, 07:37

    Reply

    I can confirm this patch works as intended, I suspect there was a caching issue on Benni's machine. However, disabling buttons is a "hot topic" for people relying on screen readers as it may not be obvious _why_ the button is disabled. I therefore opt to drop the `disabled` flag completely.
  15. Ayke Halder commented on patch set 4 11/22/24, 14:41

    Reply

    Good point! In this case the "search"-button might also be used like a "reload"-button. Reload also makes sense in case the search-term is empty. * So this button should be enabled all the time. * And this button could be visually positioned as a separate button without connection to the search-field. * The hidden label of the button might be changed to "Load result"/"Show result" instead of "Search". What do you think? Shall I implement these changes?
  16. Benni Mack commented on patch set 4 11/22/24, 14:42

    Reply

    Yes. good idea.
  17. Benni Mack commented on patch set 4 11/22/24, 14:48

    Maybe we can have a look at this issue - https://forge.typo3.org/issues/103458 because then we could make it consistent everywhere
  18. Ayke Halder commented on patch set 4 11/22/24, 15:28

    Reply

    In general we should also account for the "loading"-state of these search buttons: E.g. disable the button while loading and/or change the label to "Search. Result already loading. Waiting for loading to finish." And take into account that focusing of diabled buttons is not working then: https://a11ysupport.io/tests/html_button(type-button--disabled)#:~:text=Grading%20method After result-loading has finished, maybe jump (focus) to the result.

    Reply

    Sure, this is exactly the UX/a11y issue we are talking about. (I wait for the scheduled forge.typo3.org update to finish.)
  19. Benni Mack commented on patch set 4 12/11/24, 15:07

    Reply

    any update here?
  20. Ayke Halder commented on patch set 4 12/11/24, 15:30

    Reply

    This is about a concept now. How can we find a new concept, and agree on the concept - before actually implementing any code? If I just think about a concept and implement it, it might be wasted time on the implementation in case the concept itself is not accepted.
  21. Benni Mack commented on patch set 4 12/11/24, 16:30

    Reply

    IS this something for the UX team? having a unified search and filter component that behaves the same everywhere?
  22. Andreas Kienast voted on patch set 4 CR +1 V +1 12/20/24, 14:11

  23. Benni Mack commented on patch set 4 CR +2 V +2 12/20/24, 15:07

    yes. let's get this one in.
  24. Benni Mack commented on patch set 4 12/20/24, 15:07

    Reply

    Acknowledged

    Reply

    I suggest to get this patch in now. It's an improvement over the current situation.
  25. Benni Mack merged patch set 5 12/20/24, 15:07