There are a lot of places in the theme system where attributes are not handled as per the new Attributes system.
(see #1290694: Provide consistency for attributes and classes arrays provided by template_preprocess())

This meta issue will provide a place where we can track all the changes that need to be made to attributes, so that we will be able to reference them consistently throughout our Twig templates.

Attributes Issues:

Background information for developers
http://drupal.org/node/1727592

Comments

bstoppel’s picture

Issue tags: +Twig

tagging

podarok’s picture

Issue tags: -Twig

how can we test it?
It would be nice to grab full list of places need for change due to #1290694: Provide consistency for attributes and classes arrays provided by template_preprocess() for possibly upcoming spint

podarok’s picture

crosspost

jenlampton’s picture

Issue tags: +Twig

I agree, a list would be helpful so that's what this issue is for.

As we go through template files it will be easy to identify places where we should be using attributes, and are not currently. As we find those places, each one can get an issue, and then we can edit this post and add the link to the other issue, as I have done above under "Attributes issues".

So far I have only found the one, but I'm sure there are others :)

jenlampton’s picture

Issue summary: View changes

added docs

vlad.dancer’s picture

Here couple of such things
system.module theme_exposed_filters()
toolbar.module theme_toolbar_toggle()
toolbar.module toolbar_preprocess_html()
toolbar.module toolbar_preprocess_toolbar()

podarok’s picture

#5 + #4 good to see it indjected into summary

podarok’s picture

Issue summary: View changes

removed other

mitokens’s picture

Component: Twig templates » Twig templates conversion (front-end branch)
Issue summary: View changes
Related issues: +#1290694: Provide consistency for attributes and classes arrays provided by template_preprocess()
nod_’s picture

Project: » Drupal core
Version: » 9.2.x-dev
Component: Twig templates conversion (front-end branch) » theme system

This issue not having a project is messing with my script

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

jwilson3’s picture

Status: Active » Closed (outdated)

The filter-tips.html.twig and accompanying template_preprocess_filter_tips() that ships with Drupal 11 do use Attributes appropriately and provide no default classes anymore.

Since there were no other templates identified that don't follow the recommended use of Attributes, this issue seems irrelevant at this point.