The search form block uses the default block template, and thus needs to add classes and other attributes through preprocess. The main purpose is so that the Search button can be inline with the keywords input element.
Make Bartik and Classy templates specific to the search block that include the classes. Leave the preprocess function in Search that adds the "role" attribute, since this is specific to searching and should be done in this preprocess function.
Decide whether this should be done.
- Reduce the preprocess function in the Search module.
- This is in keeping with the move away from using functions and doing everything in templates.
- Easier for themers to control the class attributes printed in the search form block.
- Having to know this template is separate if you use Classy as your base theme... however since it is right there in the templates directory, it is probably obvious.
Original report by @Jeff Burnz
Beta phase evaluation
|Issue category||This is a task because it copies templates, makes some preprocess changes, but does not add new features.|
|Issue priority||This is not critical because nothing is broken.|
|Unfrozen changes||Unfrozen because it only changes templates and a preprocess function, and markup is not currently frozen.|
|Prioritized changes||The main goal of this issue is improving themer experience (TX). This was a follow up to phase 1 Consensus Banana changes, removing CSS classes from preprocess, and can be considered part of those prioritized changes.|
|Disruption||This is not a disruptive change, or at most a minor disruption which the benefits outweigh.|