Review main Abandoned

66269[BUGFIX] Render action buttons in the backend as HTML buttons

Olaf Schmidt-Wischhöfer CR 0 V 0 Hard +361 −53 updated 11/09/21, 12:57

Commit message

The LinkButton class renders an <a href=...> pattern, which is
an accessibility issue if the button is not a real link.
For screen readers, using a <button> tag in these cases is better.
To solve the issue an ActionButton class is introduced.

All uses of LinkButtons with a href of '#' are converted to use
the new ActionButton class.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 27

Show 7 more files

Review log 3451

Show 1726 earlier messages
  1. Olaf Schmidt-Wischhöfer uploaded patch set 1 10/23/20, 15:32

  2. Oliver Klee commented on patch set 1 CR +1 10/23/20, 15:38

    JavaScriptButton.php:2

    For all new PHP files, please make them strict.
  3. TYPO3com voted on patch set 1 V +1 10/23/20, 15:44 Completed build in 12m 21s on Fri, 23 Oct, 03:44 PM Test Summary: 73482 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6854

  4. Olaf Schmidt-Wischhöfer wrote 10/23/20, 19:39

    Topic set to a11y
  5. Olaf Schmidt-Wischhöfer updated the commit message in patch set 2 10/26/20, 10:33

  6. Olaf Schmidt-Wischhöfer commented on patch set 2 10/26/20, 10:35

    JavaScriptButton.php:2 Reply

    Done
  7. TYPO3com voted on patch set 2 V +1 10/26/20, 10:47 Completed build in 13m 30s on Mon, 26 Oct, 10:47 AM Test Summary: 73584 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6884

  8. Olaf Schmidt-Wischhöfer uploaded patch set 3 10/26/20, 11:04

  9. TYPO3com voted on patch set 3 V -1 10/26/20, 11:17 Completed build in 12m 25s on Mon, 26 Oct, 11:17 AM Test Summary: 29 of 74069 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6885

  10. Olaf Schmidt-Wischhöfer rebased onto patch set 4 10/26/20, 14:59

  11. TYPO3com voted on patch set 4 V -1 10/26/20, 15:12 Completed build in 12m 36s on Mon, 26 Oct, 03:12 PM Test Summary: 29 of 74069 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6894

  12. Olaf Schmidt-Wischhöfer uploaded patch set 5 10/28/20, 09:39

  13. TYPO3com voted on patch set 5 V -1 10/28/20, 09:50 Completed build in 11m 36s on Wed, 28 Oct, 09:50 AM Test Summary: 29 of 74069 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6959

  14. TYPO3com commented on patch set 5 10/28/20, 15:29 Completed build in 11m 36s on Wed, 28 Oct, 03:29 PM Test Summary: 29 of 74069 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6974

  15. Michael Telgkamp uploaded patch set 6 10/29/20, 12:43

  16. TYPO3com voted on patch set 6 V +1 10/29/20, 12:56 Completed build in 12m 48s on Thu, 29 Oct, 12:56 PM Test Summary: 73578 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7000

  17. Michael Telgkamp commented on patch set 6 V +1 CR +1 10/29/20, 13:10

    I changed the type to [BUGFIX] as it fixes an accessibility bug and should be backported for TYPO3v10.
  18. Oli Bartsch commented on patch set 6 V -1 10/29/20, 16:04

    Introducing new configuration / API classes, needs at least an important rst (especially when backporting).

    JavaScriptButton.php:2

    Please declare strict types in new classes

    JavaScriptButton.php:37

    I don't understand the naming "JavaScriptButton". Other button types do also trigger JS, what is the difference here?

    JavaScriptButton.php:40

    Shouldn't it be "button"?

    JavaScriptButton.php:47

    Same, "button"?

    LinkButton.php:24

    There are a lot more occurrences where LinkButton->setHref('#') is used. Shouldn't these also be replaced?

    JavaScriptButtonTest.php:2 Unresolved

    Please declare strict types in new classes

    JavaScriptButtonTest.php:25

    TBH I don't see the benefit in such trivial unit tests. I think acceptance tests would be more suitable here. Or at least some real life example (Creating a button with some options, calling ->render() and check if the generated HTML matches the expected).
  19. Martin Kutschker commented on patch set 7 11/22/20, 19:45

    Published edit on patch set 6.
  20. TYPO3com voted on patch set 7 V -1 11/22/20, 19:46 Completed build in 22s on Sun, 22 Nov, 07:46 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7512

  21. Martin Kutschker commented on patch set 7 11/22/20, 20:02

    JavaScriptButton.php:37 Reply

    Within TYPO3\CMS\Backend\Template\Components\Buttons only the InputButton and SplitButton render a <button>. The former is by its description used to submit a form. This class here triggers JS action, so I'd name it ActionButton.

    JavaScriptButton.php:40 Reply

    Ack

    JavaScriptButton.php:47 Reply

    Ack
  22. Martin Kutschker commented on patch set 7 12/07/20, 11:22

    JavaScriptButton.php:2 Reply

    Done

    JavaScriptButton.php:37 Reply

    Olaf accepted ActionButton. What do you think?
  23. Oli Bartsch commented on patch set 7 12/07/20, 11:59

    JavaScriptButton.php:37 Reply

    Ack
  24. Martin Kutschker commented on patch set 7 12/07/20, 13:32

    LinkButton.php:24 Reply

    Done

    JavaScriptButtonTest.php:25 Reply Unresolved

    The tests follow only the bad (?) example of the other buttons.
  25. Martin Kutschker uploaded patch set 8 12/07/20, 14:24

  26. TYPO3com voted on patch set 8 V -1 12/07/20, 14:25 Completed build in 29s on Mon, 7 Dec, 02:25 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7911

  1. Martin Kutschker uploaded patch set 9 12/07/20, 14:33

  2. TYPO3com voted on patch set 9 V -1 12/07/20, 14:45 Completed build in 11m 13s on Mon, 7 Dec, 02:45 PM Test Summary: 32 of 32664 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7912

  3. Martin Kutschker uploaded patch set 10 12/07/20, 20:53

  4. TYPO3com voted on patch set 10 V -1 12/07/20, 21:03 Completed build in 09m 32s on Mon, 7 Dec, 09:03 PM Test Summary: 30 of 32664 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7942

  5. Andreas Kienast commented on patch set 10 CR -1 12/08/20, 07:28

    ActionButton.php:149

    Please use `$attributeString = GeneralUtility::implodeAttributes($attributes, true);` instead.
  6. Martin Kutschker uploaded patch set 11 12/08/20, 16:49

  7. Martin Kutschker commented on patch set 11 12/08/20, 16:51

    ActionButton.php:149 Reply

    Done
  8. TYPO3com voted on patch set 11 V -1 12/08/20, 17:00 Completed build in 11m 07s on Tue, 8 Dec, 05:00 PM Test Summary: 29948 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7969

  9. TYPO3com commented on patch set 11 12/08/20, 19:46 Completed build in 11m 06s on Tue, 8 Dec, 07:46 PM Test Summary: 1 of 28796 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7972

  10. Oliver Klee wrote 12/08/20, 20:25

    Removed reviewer Oliver Klee.
  11. Martin Kutschker uploaded patch set 12 12/09/20, 20:51

  12. TYPO3com voted on patch set 12 V +1 12/09/20, 21:02 Completed build in 10m 08s on Wed, 9 Dec, 09:02 PM Test Summary: 32423 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8011

  13. Oli Bartsch commented on patch set 12 CR -1 12/09/20, 21:17

    > Introducing new configuration / API classes, needs at least an important rst (especially when backporting). Still missing the rst. Since the new Button is public API it must be documented as such.
  14. Martin Kutschker commented on patch set 12 12/10/20, 20:21

    Reply

    I have asked in the Core-Slack-Channel if this is a feature or bugfix. Nobody bothered to answer. I guess if it is a feature it shouldn't be marked wiht [BUGFIX]. But then please argue with Michael Telgkamp who changed the commit message.
  15. Oli Bartsch commented on patch set 12 12/11/20, 00:03

    Reply

    I'm fine with bugfix. That's why I wrote "at least an important rst". New functionality must be documented so extension authors get to know the how and why.
  16. Martin Kutschker uploaded patch set 13 12/11/20, 19:50

  17. TYPO3com voted on patch set 13 V -1 12/11/20, 20:02 Completed build in 12m 45s on Fri, 11 Dec, 08:02 PM Test Summary: 2 of 32664 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8090

  18. Martin Kutschker commented on patch set 13 12/13/20, 14:20

    Reply

    Done
  19. Martin Kutschker rebased onto patch set 14 12/13/20, 14:37

  20. TYPO3com voted on patch set 14 V +1 12/13/20, 14:46 Completed build in 08m 42s on Sun, 13 Dec, 02:46 PM Test Summary: 32426 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8134

  21. Martin Kutschker uploaded patch set 15 12/22/20, 19:30

  22. TYPO3com voted on patch set 15 V +1 12/22/20, 19:39 Completed build in 09m 02s on Tue, 22 Dec, 07:39 PM Test Summary: 32552 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8441

  23. Benni Mack commented on patch set 15 08/11/21, 19:27

    I think we shouldn't add this to 10.4.
  24. Christian Kuhn commented on patch set 15 11/09/21, 12:57

    Hey. Last action on this patch was 11 month ago. For the sake of a clean review system, I'll go ahead and will abandon the change for now. This does not mean the patch can't make it! In case work continues here, feel free to resurrect the patch and finish it. I hope that is fine with you.
  25. Christian Kuhn abandoned the change 11/09/21, 12:57