Review main Merged

86009[BUGFIX] Make some buttons reachable by keyboard

Ayke Halder CR +2 V +2 Easy +18 −17 updated 02/13/25, 15:47

Commit message

This makes some buttons reachable by keyboard.

Before these buttons were implemented as `a`-tags with missing
`href`-attributes, and thereby were not focusable.

Used RegExp to find candidates for fixing:
`<a\b(?:(?!\b?href=)[^>])*>`

This also updates the 'styleguide' for 'modals' to show correct
trigger-buttons in example code.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Michael Telgkamp +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Benni Mack +2
    • Riccardo De Contardi +1
    • Michael Telgkamp +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 1517

  1. Ayke Halder uploaded patch set 1 09/11/24, 09:45

  2. Ayke Halder updated the commit message in patch set 2 09/11/24, 09:47

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

  4. Benni Mack updated the commit message in patch set 3 V +1 10/18/24, 13:49

  5. Simon Schaufelberger uploaded patch set 4 12/07/24, 13:57

  6. core-ci voted on patch set 4 V +1 12/07/24, 14:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70746

  7. Simon Schaufelberger voted on patch set 4 CR +1 V +1 12/10/24, 15:32

  8. Michael Telgkamp voted on patch set 4 CR +1 12/16/24, 14:45

  9. Michael Telgkamp voted on patch set 4 V +1 12/16/24, 14:45

  10. Riccardo De Contardi commented on patch set 4 V +1 12/23/24, 14:42

    Verified on latest main on all elements changed by the patch so far
  11. Benni Mack voted on patch set 4 CR +2 V +2 01/08/25, 15:31

  12. Benni Mack merged patch set 5 01/08/25, 15:31

  13. Benjamin Kott commented on patch set 5 01/14/25, 09:33

    post -1 | the display of the insert elements is now visually broken and all elements are missaligned
  14. Ayke Halder commented on patch set 5 01/14/25, 10:54

    Reply

    I can reproduce the issue. `<button>` is behaving like a "replaced element" and therefore this does not work as intended: `<button class="d-block">` with `.d-block {display: block !important}` One possible general solution is to implement extra CSS for buttons: ```css button.d-block { width: 100%; } ``` @benjamin.kott@outlook.com Shall this be fixed by a general solution for `button.d-block` - or on a case-by-case basis? About the very same button issue: https://stackoverflow.com/questions/27605390/why-doesnt-display-block-width-auto-stretch-a-button-to-fill-the-contai/27605483#27605483 About "replaced element": https://developer.mozilla.org/en-US/docs/Web/CSS/Replaced_element#using_css_with_replaced_elements
  15. Benjamin Kott commented on patch set 5 01/14/25, 11:28

  16. Benjamin Kott commented on patch set 5 01/14/25, 11:29

    Reply

    i´ have a pending fix, it also restores general functionality as buttons are not handled by the javascript handler.
  17. Andreas Kienast commented on patch set 5 02/13/25, 15:47

    This patch broke the recycler as well – https://review.typo3.org/c/Packages/TYPO3.CMS/+/88208