Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISAICP-6548: Preserve link attributes in menus #38

Open
wants to merge 1 commit into
base: 1.x
Choose a base branch
from

Conversation

pfrenssen
Copy link
Member

@pfrenssen pfrenssen commented Jul 26, 2021

When using the theme in Joinup we are seeing test failures in the navigation menus.

After investigation it appears that the menu links are rendered by creating the <a> tag from scratch, preserving only the class and target attributes. All other attributes that might be present on the link are ignored. We are missing things such as the title attribute, aria attributes, and Drupal data- attributes which are needed for JavaScript behaviours.

A good solution would be to use the link() Twig function which preserves all attributes.

The links were constructed from scratch, preserving only 'class' and 'target'
attributes, and disregarding any other attributes that might be present, such as
'title', 'hreflang', aria attributes, and Drupal 'data-' attributes which are
needed for JavaScript behaviors.
@pfrenssen pfrenssen changed the title Preserve link attributes in menus ISAICP-6548: Preserve link attributes in menus Jul 26, 2021
@escuriola
Copy link
Contributor

I think this is not happened any more. Can I close @brummbar @drishu?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants