Review main Merged

81883[BUGFIX] Have record icons with human readable title

Christian Rath-Ulrich CR +2 V +2 Normal +82 −52 updated 04/26/24, 21:41

Commit message

Add record titles to the record icon alt text. To make
the alt text for record icons helpful, the title and
type of the record is now added to the existing id=x.

To implement this also for the pagetree, the method
BackendUtility::titleAttribForPages() has got a new
parameter to return the value unescaped.
The JsonResponse in the TreeController already
escapes the data and additionally the TemplateResult
from lit also does escaping.

Additionally BackendUtility::getRecordIconAltText() received
a new parameter to make it possible to not escape string values.
This is necessary to prevent values to get double encoded when
used in the fluid context.

Review

  • Code review CR +2 Done
    • Jasmina Ließmann +2
    • Benjamin Franzke +1
    • Christian Kuhn +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Jasmina Ließmann +2
    • Benjamin Franzke +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 1

Files 11

Review log 6086

Show 4161 earlier messages
  1. Christian Rath-Ulrich uploaded patch set 1 11/22/23, 21:48

  2. core-ci voted on patch set 1 V +1 11/22/23, 21:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49564

  3. Christian Rath-Ulrich uploaded patch set 2 11/22/23, 22:08

    Copied Votes: * Verified+1 (copy condition: "**changekind:NO_CHANGE**")
  4. core-ci voted on patch set 2 V +1 11/22/23, 22:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49565

  5. Simon Schaufelberger updated the commit message in patch set 3 V +1 11/22/23, 23:53

  6. Simon Schaufelberger commented on patch set 3 11/22/23, 23:54

    please have a look at the commit message rules for the core!
  7. Simon Schaufelberger commented on patch set 3 CR -1 11/22/23, 23:57

    locallang_core.xlf:1522

    no space at the end in translation
  8. core-ci voted on patch set 3 V +1 11/22/23, 23:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49571

  9. Christian Rath-Ulrich uploaded patch set 4 CR -1 V +1 11/23/23, 09:56

  10. core-ci voted on patch set 4 V +1 11/23/23, 10:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49621

  11. Jasmina Ließmann commented on patch set 4 CR -1 11/23/23, 12:40

    There are multiple occurences with "id=XX" as title (attribute) in the backend. I would suggest to get the table name automatically and use a more generic local lang label. Will have a look at this.
  12. Christian Rath-Ulrich commented on patch set 4 11/23/23, 16:29

    Reply

    i don't think the table name is descriptive enough to serve as an orientation
  13. Jasmina Ließmann commented on patch set 4 11/23/23, 19:14

    Reply

    I meant the readable table name which is definied in e.g `['ctrl']['title']`. This information is already there. There is more than just the icon of the content element (table `tt_content`) with this ID information in title tag of the span. By using the already existing titles/names of the tables/records we avoid duplicate language labels which have to be in sync in case of future changes.
  14. Christian Rath-Ulrich uploaded patch set 5 CR -1 V +1 11/29/23, 09:14

  15. core-ci voted on patch set 5 V +1 11/29/23, 09:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50097

  16. Jasmina Ließmann uploaded patch set 6 V +1 11/29/23, 16:25

  17. core-ci voted on patch set 6 V -1 11/29/23, 16:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50130

  18. Jasmina Ließmann uploaded patch set 7 V -1 11/29/23, 16:38

  19. core-ci voted on patch set 7 V +1 11/29/23, 16:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50131

  20. Christian Kuhn uploaded patch set 8 V +1 11/29/23, 17:30

  21. Christian Kuhn uploaded patch set 9 11/29/23, 17:33

  22. core-ci voted on patch set 8 V -1 11/29/23, 17:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50132

  23. core-ci voted on patch set 9 V -1 11/29/23, 17:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50133

  24. Christian Kuhn uploaded patch set 10 V -1 11/29/23, 17:39

  25. core-ci voted on patch set 10 V +1 11/29/23, 17:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50134

  26. Jasmina Ließmann commented on patch set 10 11/29/23, 19:36

    As much as I welcome adjustments for accessibility, I am honestly unsure whether adding the record type information to the title tag will make the information more difficult to read/understand for sighted users because of the text duplication. The record types are all grouped in a panel/accordion, so in this case the connection should be visually clear for this user group. I'm open to further opinions :) Maybe the information could be outsourced to an aria label, which then overwrites the title tag for screen readers?
  27. Christian Kuhn commented on patch set 10 11/29/23, 19:40

    Reply

    Done

    locallang_core.xlf:1522 Reply

    Done
  28. Jasmina Ließmann commented on patch set 10 11/29/23, 19:41

    Reply

    Done

    Reply

    Updated the code according to the suggestion.

    locallang_core.xlf:1522 Reply

    Done
  29. Benjamin Kott commented on patch set 10 V -1 03/01/24, 07:19

    This patch does not deliver the expected results. Content elements in the page view for example now all just state "Page Content - ID=<recordid>", while this is more information than only "ID=<recordid>" the information is not helpful as it does not help to identify the element. - Record Type Missing - Title of the element is missing.
  30. Willi Wehmeier uploaded patch set 11 V +1 03/05/24, 08:10

  31. core-ci voted on patch set 11 V -1 03/05/24, 08:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53919

  32. Willi Wehmeier uploaded patch set 12 V -1 03/05/24, 08:24

  33. core-ci voted on patch set 12 V -1 03/05/24, 08:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53920

  34. Willi Wehmeier uploaded patch set 13 V -1 03/15/24, 10:56

  35. core-ci voted on patch set 13 V -1 03/15/24, 11:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54580

  36. Oliver Hader commented on patch set 13 03/15/24, 11:44

    TreeController.php:361

    Any chances to avoid `htmlspecialchars_decode` here?
  37. Willi Wehmeier commented on patch set 13 03/15/24, 11:51

    TreeController.php:361 Reply

    Unfortunately not. The tooltip is getting encoded automatically by the JsonView again. The only way to get around this is to not encode the title in the BackendUtility.
  38. Willi Wehmeier uploaded patch set 14 V -1 03/15/24, 12:40

  39. core-ci voted on patch set 14 V -1 03/15/24, 12:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54588

  40. Willi Wehmeier uploaded patch set 15 V -1 03/15/24, 12:57

  41. Willi Wehmeier commented on patch set 15 03/15/24, 13:00

    TreeController.php:361 Reply

    Used another approach by adding an additional parameter to BackendUtility::titleAttribForPages()
  42. core-ci voted on patch set 15 V -1 03/15/24, 13:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54591

  43. Benjamin Franzke commented on patch set 15 03/15/24, 13:18

    Icon.php:277

    This is unsafe, the input (e.g. `$this->getTitle()`) must be unescaped. Whetever set's the title must not use `htmlspecialchars`, as we want to apply `htmlspecialchars` as late as possible (that means here, and not disable it). I guess that means `BackendUtility::getRecordIconAltText` should avoid `htmlspecialchars` as well (add a parameter as well).
  44. Simon Schaufelberger wrote 03/15/24, 13:40

    Removed reviewer Simon Schaufelberger.
  45. Willi Wehmeier uploaded patch set 16 V -1 03/18/24, 10:01

  46. Willi Wehmeier commented on patch set 16 03/18/24, 10:06

    Icon.php:277 Reply

    I re-added the escaping in the Icon class and avoided the escaping of the strings put into the ->setTitle() method to avoid double escaping. You guessed correctly, the method getRecordIconAltText needed an additional parameter too.
  47. core-ci voted on patch set 16 V -1 03/18/24, 10:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54649

  48. Benjamin Franzke uploaded patch set 17 V -1 03/18/24, 10:34

  49. Benjamin Franzke uploaded patch set 18 03/18/24, 10:39

  50. Benjamin Franzke commented on patch set 18 03/18/24, 10:40

    TreeController.php:361 Reply

    Thanks, looks good now.

    Icon.php:277 Reply

    Done
  51. core-ci voted on patch set 17 V -1 03/18/24, 10:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54651

  52. core-ci voted on patch set 18 V -1 03/18/24, 10:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54652

  53. Benjamin Franzke uploaded patch set 19 V -1 03/18/24, 13:32

  54. core-ci voted on patch set 19 V -1 03/18/24, 13:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54659

  55. Benjamin Franzke uploaded patch set 20 V -1 03/18/24, 14:10

  56. core-ci voted on patch set 20 V +1 03/18/24, 14:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54661

  57. Willi Wehmeier commented on patch set 20 03/18/24, 21:15

    Reply

    Isn‘t your comment related to the RecordList module only? The patch adds this info globally and when the title is shown on a content element icon tooltip in the page module I think the record type does add value.
  58. Jasmina Ließmann commented on patch set 20 03/18/24, 22:28

    Reply

    At the time of my comment, only the table name was displayed in addition to the ID. Therefore it is no longer valid. Currently - only for content elements - the name of the CType is displayed in addition to the ID and title. This information is now doubled in Page module with the value in div.ce-header-title, which follows shortly after the span edited here. Is this problematic because it could be read aloud twice?
  59. Willi Wehmeier commented on patch set 20 03/19/24, 13:09

    Reply

    @benjamin.kott@outlook.com commented before, that title AND record-type should be included to deliver the exprected results. I'm not sure if it's going to be problematic or okay'ish because the duplication is only present in the page module. Maybe @ben@bnf.dev can help?
  60. Benjamin Kott voted on patch set 20 CR -1 04/16/24, 09:23

  61. Benjamin Kott commented on patch set 20 04/16/24, 09:24

    having an exception for irre records, investigating
  1. Benjamin Kott uploaded patch set 21 CR -1 V +1 04/16/24, 10:11

  2. Benjamin Kott uploaded patch set 22 04/16/24, 10:15

  3. core-ci voted on patch set 21 V -1 04/16/24, 10:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56069

  4. core-ci voted on patch set 22 V -1 04/16/24, 10:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56071

  5. Benjamin Kott uploaded patch set 23 V -1 04/16/24, 10:27

  6. Benjamin Kott uploaded patch set 24 04/16/24, 10:28

  7. core-ci voted on patch set 23 V -1 04/16/24, 10:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56073

  8. core-ci voted on patch set 24 V +1 04/16/24, 10:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56074

  9. Benjamin Kott commented on patch set 24 04/16/24, 10:38

    Reply

    Done
    @minapokhalo+typo3@gmail.com I think the one does not exlude the other, i would suggest to move here in small steps to get it going. In general i agree that we need better labels, titles and descriptions as you already suggested.
  10. Benjamin Kott commented on patch set 24 04/16/24, 10:40

    BackendUtility.php:1291

    as discussed with @lolli@schwarzbu.ch, we need to handle this for now outside the form-engine until we managed to have better defined types that we can pass around.
  11. Benjamin Kott voted on patch set 24 CR +1 V +1 04/16/24, 10:43

  12. Andreas Kienast commented on patch set 24 CR -1 04/16/24, 13:22

    BackendUtility.php:1321

    $ctrl['enablecolumns']['starttime']

    BackendUtility.php:1326

    $ctrl['enablecolumns']['endtime']
  13. Willi Wehmeier uploaded patch set 25 CR +1 V +1 04/16/24, 13:50

  14. Willi Wehmeier commented on patch set 25 04/16/24, 13:51

    BackendUtility.php:1321 Reply

    done!

    BackendUtility.php:1326 Reply

    done!
  15. core-ci voted on patch set 25 V +1 04/16/24, 13:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56087

  16. Willi Wehmeier updated the commit message in patch set 26 V +1 04/17/24, 13:24

  17. core-ci voted on patch set 26 V +1 04/17/24, 13:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56161

  18. Benjamin Franzke commented on patch set 26 CR +1 04/17/24, 13:42

    There are 7 conflicts (4 are just icon enum changes, but 3 looks like some more work) when trying to cherry-pick to v12. @wwwehmeier@gmail.com could you cherry-pick this to v12 and then push the cherry-picked version (with conflicts resolved) to `HEAD:refs/for/12.4`?
  19. Willi Wehmeier commented on patch set 26 04/17/24, 14:24

    Reply

    Done 😊
  20. Andreas Kienast voted on patch set 26 CR +1 V +1 04/18/24, 14:26

  21. Christian Kuhn commented on patch set 26 CR +1 04/18/24, 15:01

    BackendUtility.php:1291

    Well, yes. Talked about this with Kott: BackendUtility is essentially the place where the FormEngine rewrite stopped rewriting and re-used existing stuff in v7 / v8. BU is quite a mess in general and needs to be re-modeled properly. When looking at the "static" methods that play a central role, for instance 'getProcessedValue()', it becomes obvious 80% of the class are a screaming technical debt. We won't be able to deal with this in a timely manner, though. As such, I in general do not like the new hacks that suppress escaping, but I accept that's the way to go for now, until we create proper API to determine title, title tags, and other details properly. As such, I'm fine with these changes (for now).
  22. Benjamin Franzke voted on patch set 26 V +1 04/19/24, 08:55

  23. Jasmina Ließmann voted on patch set 26 CR +2 V +2 04/19/24, 09:04

  24. Jasmina Ließmann merged patch set 27 04/19/24, 09:04

  25. Jasmina Ließmann commented on patch set 27 04/26/24, 21:41

    I found some wrong behaviour in "Localization Overview" and prepared a patch: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84044