Review main Merged

73048[FEATURE] Mark current page in fluid_styled_content menu content elements

Jonas Eberle CR +2 V +2 Normal +52 −11 updated 02/10/22, 07:36

Commit message

This adds an aria-current="page" attribute to link tag of current menu-item in fluid_styled_content menu content elements.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Christian Kuhn +1
    • Michael Telgkamp +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Michael Telgkamp +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 11

Review log 3138

Show 1113 earlier messages
  1. Jonas Eberle uploaded patch set 1 01/17/22, 21:11

  2. Jonas Eberle marked it work in progress 01/17/22, 21:11

  3. core-ci voted on patch set 1 V +1 01/17/22, 21:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22199

  4. Jonas Eberle marked it ready for review 01/31/22, 19:45

  5. Annett Jähnichen commented on patch set 1 V +1 CR +1 01/31/22, 20:57

    It works for me.
  6. Georg Ringer commented on patch set 1 01/31/22, 21:12

    Feature-90994-MarkCurrentPageInFluid_styled_contentMenuContentElements.rst:18

    isn't there a line missing between the code-block and its content?

    MenuAbstract.html:8

    i would just call it active. we don't ship any frontend, so why not use the same as bootstrap
  7. Jonas Eberle uploaded patch set 2 02/01/22, 06:03

  8. Jonas Eberle commented on patch set 1 02/01/22, 06:03

    Feature-90994-MarkCurrentPageInFluid_styled_contentMenuContentElements.rst:18 Reply

    Ack

    MenuAbstract.html:8 Reply

    Please see the discussion on forge. We think it is more modern.
  9. core-ci voted on patch set 2 V +1 02/01/22, 06:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22858

  10. Benni Mack commented on patch set 2 CR -1 02/01/22, 07:45

    can only go into main branch as its a feature
  11. Jonas Eberle updated the commit message in patch set 3 02/01/22, 07:51

  12. Jonas Eberle marked it work in progress 02/01/22, 07:52

  13. Michael Telgkamp commented on patch set 3 CR -1 02/01/22, 08:02

    A note from the accessibility team. We should also improve the accessibility here.

    Feature-90994-MarkCurrentPageInFluid_styled_contentMenuContentElements.rst:20

    From an accessibility point of view there should be an attribute `aria-current="page"` for the `<a>` tag. As this can also be used for styling, there is no need for the class on the `<li>`.

    MenuAbstract.html:8 Reply

    A hint from the accessibility side is to use the attribute `aria-current="page"` this can also be used for styling with the selector `[aria-current="page"]`, but it needs to be an attribute of the `<a>` tag.
  1. core-ci voted on patch set 3 V +1 02/01/22, 08:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22859

  2. Annett Jähnichen uploaded patch set 4 02/04/22, 17:30

  3. core-ci voted on patch set 4 V +1 02/04/22, 17:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23013

  4. Jonas Eberle marked it ready for review 02/05/22, 16:06

  5. Jonas Eberle commented on patch set 4 V +1 CR +1 02/07/22, 16:26

    I guess it is ok for me to vote since the substantial changes are by Annett ;)

    Feature-90994-MarkCurrentPageInFluid_styled_contentMenuContentElements.rst:20 Reply

    Done

    MenuAbstract.html:8 Reply

    > can also be used for styling with the selector `[aria-current="page"]`, but it needs to be an attribute of the `<a>` tag. That would only allow to style the <a> since we do not have the :has() selector yet (https://developer.mozilla.org/en-US/docs/Web/CSS/:has). We decided that styling the <li> might be needed, too so we added classes on it as well.
  6. Nikita Hovratov commented on patch set 4 02/07/22, 17:51

    Let's make the class configurable in styles.content, so one wouldn't need to edit all Templates in order to change it. Also not so sure if to activate it by default. For current sites, which will update to v12, only the aria tag makes sense. The added class is only useful for new sites.
  7. Jonas Eberle commented on patch set 4 02/07/22, 20:38

    Reply

    I would suggest to integrators to adapt their CSS for that HTML rather than the other way around. I really do not think that this rewards a configuration option. The class is a convenience item that'll save many from changing the templates. It is more about having that information at all than to have it perfectly fitting to your existing frontend.
  8. Annett Jähnichen commented on patch set 4 02/07/22, 20:41

    Reply

    Thx for your feedback, I find that a general TypoScript configuration for this CSS class again involves a lot of overhead. That's exactly what the template is there for, to customize its frontend output. If there are problems with the update, I would rather suggest adapting the CSS or overwriting the template.
  9. Michael Telgkamp commented on patch set 4 CR -1 02/08/22, 07:49

    Reply

    If we want to try not to introduce overhead, we should also skip the css class, as styling the current link can also be done using the aria-attribute with css selector `[aria-current="page"]` it would also be nice to spread the word inside the RST that styling using the accessibility attributes is in general a good idea, because using the attribute for the visual styles allows you to see, if the attribute is missing when it is expected to be there.
  10. Jonas Eberle commented on patch set 4 02/08/22, 08:16

    Reply

    > with css selector `[aria-current="page"]` it cannot be used to style the <li>. Please read my comments. This class is not overhead. This is convenience. It can go again if :has() is there. A config option adds complexity because it needs documentation.
  11. Jonas Eberle marked it work in progress 02/09/22, 09:38

  12. Annett Jähnichen uploaded patch set 5 02/09/22, 16:23

  13. Annett Jähnichen commented on patch set 5 02/09/22, 16:26

    Reply

    We discussed the problem and decided to remove is-current class on li tag. Add a description for best practice styling the a-tag in Changelog Documentation.
  14. Annett Jähnichen uploaded patch set 6 02/09/22, 16:35

  15. core-ci voted on patch set 5 V +1 02/09/22, 16:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23292

  16. Annett Jähnichen uploaded patch set 7 02/09/22, 16:39

  17. Jonas Eberle commented on patch set 7 02/09/22, 16:41

    This change is ready for review.
  18. Annett Jähnichen wrote 02/09/22, 16:44

    Removed reviewer Annett Jähnichen.
  19. core-ci voted on patch set 6 V +1 02/09/22, 16:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23293

  20. core-ci voted on patch set 7 V +1 02/09/22, 16:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23294

  21. Michael Telgkamp commented on patch set 7 V +1 CR +1 02/09/22, 17:24

    Looks good for me! Thank you for the last changes!
  22. Simon Schaufelberger voted on patch set 7 V +1 CR +1 02/10/22, 04:04

  23. Christian Kuhn voted on patch set 7 CR +1 02/10/22, 06:10

  24. Georg Ringer voted on patch set 7 V +2 CR +2 02/10/22, 07:36

  25. Georg Ringer merged patch set 8 02/10/22, 07:36