Closed (fixed)
Project:
UI Patterns (SDC in Drupal UI)
Version:
2.0.x-dev
Component:
Code
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Dec 2024 at 13:13 UTC
Updated:
19 Mar 2026 at 10:40 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
rajab natshahThis would be so nice. Thanks a lot, Florent, for filing the issue.
I faced an issue with Read more link or Learn more link in a call to action button

My current status is
The optimal target to work with
aria-label="[node:field_link:title] about [node:title]" target="_parent"Helpful resource: What the Heck is ARIA A Beginner's Guide to ARIA for Accessibility - Kat Shaw (A11yTalks - Aug 2024)
Thanks to A11yTalks and Kat Shaw for this!
Enhancing "Read Article" Links for Accessibility
Replace generic
"Read Article"links with meaningful ARIA labels:<a aria-label="Read the full article of {{ title }}">Read Article</a>If the link text changes to
"Learn more","Read more", or"Click", the {{ title }} token will still help maintain context for screen reader users.Comment #3
rajab natshahComment #5
rajab natshahFirst Draft MR - Integration with the Token module
Comment #6
rajab natshahTested with
Comment #7
rajab natshahAttached a static
ui_patterns--2025-05-16--3496209--mr-378.patchfile to this point in MR378To be used with Composer Patches
Comment #8
pdureau commentedHi Rajab,
Thanks for the MR, it is very exciting.
2 feedbacks:
tokenmodule? Core Token API is not enough?aria-label="[node:field_link:title] about [node:title]" target="_parent"?Comment #9
pdureau commentedComment #10
rajab natshahThanks, Pierre, for the quick review.
1- I will test that - you are right. ( testing, then to change if needed)
2- For sure, we need
( WIP )
3- UI Patterns 2.0 Docs -- the doc in code is so nice by the way!!
4- We may need to do a small UX/UI designer responsibilities - to hint site builders so that they can use tokens.
Comment #11
rajab natshahComment #12
pdureau commentedGreat plan!
Comment #13
pdureau commentedComment #14
pdureau commentedComment #15
pdureau commentedComment #16
pdureau commentedComment #17
just_like_good_vibeshello,
thank you for your work, indeed this is a nice usecase :)
Today we have some code in Token source, if we plan to generalize it in other sources like Attributes, it would be good to rely on the same code in those sources.
i suggest that factorize some appropriate code about tokens, somewhere.
In a trait or directly in the SourcePluginBase ? @Christian, others, what do you think ?
do we need tokens elsewhere? maybe yes.
Comment #18
just_like_good_vibesHello rajab natshah,
thanks to your issue, we though to introduce a more deeper support for tokens in ui patterns sources.
so we will introduce a shared code to deal with tokens here : https://www.drupal.org/project/ui_patterns/issues/3540970
Comment #19
rajab natshahThanks to Florent first
I'm with your direction Mikael, for the deeper support for tokens.
Comment #20
just_like_good_vibesComment #21
just_like_good_vibesComment #22
rajab natshahDo we still need this issue?
after #3540970: [2.0.10] Enlarge the support of tokens in sources
https://www.drupal.org/project/ui_patterns/issues/3540970#comment-16250845
I noticed the normalizer
Refactoring
Comment #23
rajab natshahComment #24
rajab natshahOh may, the new method is so clean.
Done the needed refactor.
Example test after the change:

Comment #25
rajab natshahComment #26
pdureau commentedComment #27
rajab natshahFollowing with #3504614: Render field value in component using DS field source for nested entities with DS
Tested with #3559604: Fix accessibility for repeated Read Article links by adding contextual aria-labels in Varbase blog cards and list views

Comment #28
just_like_good_vibeshello, i see the issue is in need review,
i will
grab it now if it needs review,
thank you
Comment #29
ipumpkinNice featue to included
Comment #30
just_like_good_vibesComment #32
just_like_good_vibes