- Issue created by @mh_nichts
- Status changed to Needs review
about 2 years ago 5:11am 3 October 2023 - 🇦🇷Argentina tguerineau
I have created a patch to address the issue of replacing the
aria-labelattribute witharia-labelledbyon thenavelement of the side menu, as per the DSFR 1.8 changelog. The patch includes a unique ID forsidemenu__titlewhich is then referenced byaria-labelledbyin thenavelement.In my local environment, it appears that the
block--system-menu-block.html.twigtemplate from the core system module is being used instead of thepattern-side-menu.twigtemplate from the ui_suite_dsfr theme. I have created the patch based on the assumption that thepattern-side-menu.twigtemplate should be used.I am not entirely sure if there's additional configuration needed to ensure the
pattern-side-menu.twigtemplate is used, so any feedback or testing from others would be greatly appreciated.Attached is the patch for review and testing.
- Status changed to Needs work
about 2 years ago 11:56am 3 October 2023 - 🇫🇷France pdureau Paris
Hello Tom'as,
Thanks for your contribution. Can you do a MR instead of a patch?
About:
{% set title_id = 'sidemenu__title-' ~ random() %}Can you:
- expose title_id as a pattern setting in the definition file?
title_id: type: token label:Title ID description: "Must start with a letter. Randomly generated if empty." - wrap this into a default() filter:
{% set title_id = title_id|default('sidemenu__title-' ~ random()) %}
See 📌 [beta4] Always use default() filter with random function() Fixed
Where do you use
title_id? If you "call" it fromaria-labelledbyI guess you need to "declare" it somewhere, isn't it? - expose title_id as a pattern setting in the definition file?
- Status changed to Needs review
about 2 years ago 4:39pm 5 October 2023 - 🇦🇷Argentina tguerineau
@pdureau Thank you for your detailed feedback and guidance. I've made adjustments based on your comments and suggestions:
1. Pattern Setting for title_id:
title_idhas been exposed as a pattern setting within the pattern definition file, allowing developers to understand and utilize it effectively.2. Usage of
default()filter withrandom()function: Thedefault()filter has been applied totitle_id, adhering to the best practices outlined in issue #3380233.3. Declaration and Usage of title_id:
title_idis utilized inaria-labelledbyand declared appropriately within the HTML structure to enhance accessibility.These changes have been committed and pushed to the issue fork for review and testing.
- @tguerineau opened merge request.
-
pdureau →
committed af7dbb25 on 1.0.x authored by
tguerineau →
Issue #3390166 by tguerineau: Side-menu: replace aria-label by aria-...
-
pdureau →
committed af7dbb25 on 1.0.x authored by
tguerineau →
- Status changed to Fixed
about 2 years ago 8:55am 7 October 2023 Automatically closed - issue fixed for 2 weeks with no activity.