Problem/Motivation
As you can see from below the H3 tag which is generated from using grouping (@ Format: Unformatted list | Settings:Grouping field) has no divs around it like the regular fields. In my case I would like to wrap some HTML around it but I can't see where. On the fields it's easy, just override the output with what you want but on this generated group title I haven't found how to do this so any help will be much appreciated.
<div class="view-content">
<h2><a href="/blogs/83" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Internet Department</a></h2>
<div class="views-row views-row-1 views-row-odd views-row-first views-row-last">
<div class="views-field views-field-picture">
<div class="field-content">
Steps to reproduce
- Create a view, either list or table format
- Choose Settings on format
- Choose a grouping field to create a grouped display
The output sets the grouping label at a static <h3>, which can cause heading structure inaccessibility by outputting grouping as incorrect heading levels. This creates possible WCAG violations with no way to remedy as a site builder.
Proposed resolution
Expose a grouping label tag for each grouping field where the user can specify a wrapping label element by which to group the records via the Views UI.

Remaining tasks
| Task | Novice task? | Contributor instructions | Complete? |
|---|---|---|---|
| Create a merge request | Yes | Merge request instructions | Yes, see gerardc/1383696-c |
| Get feedback on which tests should be created or modified (or grab tests from related issue) | No | Instructions | Yes |
| Write change record for the API changes | Yes | Change record Instructions | Yes |
| Manually test the patch or merge request | Novice | Patch test Instructions | No |
| Add steps to reproduce the issue | Novice | Instructions | Yes |
User interface changes
Adding a grouping label tag to the style options dialog allows for adjusting the tag per grouping field

API changes
A new grouping label tag element is being added to the existing view templates where a static <h3> was used to wrap a grouping label.
{% if title %} {% if grouping_label_element is empty %} {{ title }} {% else %} <{{ grouping_label_element }}>{{ title }}</{{ grouping_label_element }}> {% endif %} {% endif %}
This code is added to the following files:
- views-view-grouping.html.twig
- views-view-grid-responsive.html.twig
- views-view-grid.html.twig
- views-view-list.html.twig
- views-view-unformatted.html.twig
The {{ grouping_label_element }} value comes from StylePluginBase.php, which adds a new grouping_label_element array key in the form grouping array and applies if usesGroupingLabelElement = true. The following PHP style templates have that value set to TRUE:
- DefaultStyle.php
- Grid.php
- GridResponsive.php
- HtmlList.php
By default the value of this key is an <h3> element, which should prevent breakage of views that don't override the template.
Data model changes
No changes affecting the data model.
Release notes snippet
To be determined.
| Comment | File | Size | Author |
|---|---|---|---|
| #110 | 1383696-nr-bot.txt | 8.03 KB | needs-review-queue-bot |
| #57 | MicrosoftTeams-image.png | 125.35 KB | carlygerard |
Issue fork drupal-1383696
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
Reg commentedIt looks like it's a matter of overriding the views template views-view-unformatted.tpl.php . Is there another way or is this it?
Comment #2
dawehnerEven overriding a tpl doesn't help as this is not themable at the moment.
There is an issue #477338: Multiple group: group by more than one field which would allow you to theme that.
Comment #3
Reg commentedThanks for that, I think that issue is a little more complex than my needs however now seeing that it's an issue even for one group I'm thinking a little more creatively.
Have you ever considered using a view within a view as a solution? Perhaps it will put a wrapper around the inner view so we have some way of distinguishing what's group from a major heading. If so, in theory you can have an unlimited number of views in views so that may solve the issue of groups within groups as well.
Comment #4
dawehnerWell you could try to use the views_field_view module, but it's probably kind of hard to get the groupby working with it.
Comment #5
Reg commentedIf you do it correctly you won't need group by. In the parent view you make a simple list by what you would normally use as a group by and pass the value as an argument to the child view. Use the passed parameter to limit the results in the child view and you are mimicking a one to many relationship in the database. You should be able to do this to as many levels as you like barring any limitations in the module.
Comment #7
stephen Piscura commentedReg,
I'm dancing around with views grouping fields with strange results. I have a users view that creates a "staff" page with these fields:
If i choose to group by username, the grouping gets surrounded by an H3. I then exclude this field from display so that it doesn't display in both the grouping andinterior fields. But if i follow the same logic by adding the bio field as a second grouping field, then it gets the H3 and the username becomes a simple div. Obviously wrapping a long text field in a H3 is not what i want to do. What i ultimately want is something like this:
I don't know how to build the kind of views parent/child relationship using contextual filters which you've described. Can you help me and others understand how this works?
Comment #8
Reg commentedI think the answer is I use a module called "views_field_view" (http://drupal.org/project/views_field_view) not contextual filters. Have a look at that module and see if it will do what you want.
Comment #9
stephen Piscura commentedThanks for your reply Reg,
I was hoping to solve my use-case without an extra module, but if i absolutely cannot, then i'll definitely look into Views Field View.
Comment #10
rogerrogers commentedPersonally, I think this could use a basic fix: Honor the HTML tag setting of the field that the grouping is based on ('Grouping field nr.N').
All the functionality is there, including the ability to override the content, change the surrounding tags, etc. If the grouping setting just used the related fields settings this would be a breeze. I also think this would naturally be expected (at least I anticipated this would be the default behavior).
Comment #11
dawehnerThere are problems with doing this automatically
Comment #12
travis-cunningham commentedIf you change the format to HTML list and select a grouping field it gives you options to add classes to the wrapping element as well as the list and the list parent.
Comment #13
jlongbottom commentedI just created a template file that overrides for only that one view and changed the H3 to an H2
Comment #14
danny englanderI just ran into this issue as well. It was a simple matter of switching the display to Semantic Views (you'll need that module to do this) and then change the "GROUPING TITLE > Element" to h2. I don't think this is really an issue with Views, it's a themer's task to solve things like this (i.e. #13 above using a template file is a good example as well). Views gives you what are reasonable defaults but it can't anticipate every possible scenario and use case for a themer and a design.
Comment #15
damien_vancouver commentedI solved this problem using the solution in #13 of overriding the views template file in my custom theme.
I can confirm that it does work despite the comment in #2. You must override the views style template for your currently selected style (I used unformatted list so that is the template I describe). Here are the exact steps I used.
1. Copy the views-view-unformatted.tpl.php template file from sites/all/modules/views/theme and place it in your theme's templates folder.
2. Figure out the machine name of your view. Mine was called products_by_category. One way to see this machine name is to edit the view and then look at the URL in your browser address bar. It will contain the machine name: admin/structure/views/view/products_by_category/edit
3. Rename the template file you copied in step one to have your view name after --. So I renamed mine to: views-view-unformatted--products_by_category.tpl.php so it would only override for this particular view.
4. Edit the template file and adjust the line displaying the title to use whatever you want instead of h3. I made mine use a <div class="category-description"> instead of the <h3>:
5. Save everything and clear your site caches.
6. Now when you load your view it should use the new overridden template and your group field will have the markup you want.
Comment #16
giorgio79 commented#14
That's why Views should not be adding h3 tags to every group 2 level...
Views adds h3 tags for both HTML List and Unformatted list for group 2. Group 1 gets no heading at all it seems.
One can already provide custom style settings for a field. Views should use that instead of this hardcoded h3...
Comment #17
dawehnerJust in case someone is interested, I opened a feature request against Drupal 8.
Comment #18
giorgio79 commentedawesome, here is the ref #1880100: Allow to configure the h3 element for view style plugins
Just peeked at your post tracker dawehner. Wow, you're doing a massive amount of work. A thread updated around every 10 minutes :)
Comment #19
dawehnerThe drop is always moving!
Comment #20
joakaune commentedI just encountered the same problem.
And I can't for the life of me understand the logic behind views adding a random h3 tag in the middle of everything.
It makes no sense at all, and just creates extra work since you have to create a workaround.
Please remove the h3 tags and make everything unformatted unless you add custom style settings to it.
Comment #21
HAg commentedThe solution in #15, works in version 6.x too.
Comment #22
imperator_99 commentedSolution in #15 works perfectly. I changed the H3 to H2 and it all works beautifully. Should not have been an issue at all though - views really should allow you to select the style for the grouping fields just as it does for other fields, as giorgio79 suggested.
Comment #23
Abelito commented#13 worked for me!
Comment #24
jillpadams commented#15 perfect fix for Grid style as well.
Comment #25
aagd commented#15 (damien_vancouver) So easy! Thanks for the instructions. With this custom template I could also add an extra div wrapper around the list to simplify placing on a susy grid.
Comment #26
sanjadmin commentedThanks. Post #15 worked for an html list presented in a block. In my case I am using an html list view so my filename is views-view-list--rss_block.tpl.php.
Comment #27
ladybug_3777 commentedThere is a themeable function that you can override to style the group however you want. Simply use this function in your template.php file in your theme: (This function originally comes from theme.inc within the view module)
Comment #28
scotwith1tAm I crazy, or does this (the theme function above, as well as the views-view-grouping.tpl.php file) only work if you have multiple levels of grouping? I suppose that's because of dawehner's comment about breaking backwards compatibility?
Comment #29
scotwith1tSo a nice little trick I just figured out:
1) Set the grouping field to the same field for level 1 and 2
2) Remove this chunk from your views-view-style.tpl.php file (copy it to your theme and modify there)
This removes the grouping markup for level 1
3) Copy the views-view-grouping to your theme and go nuts. You can (probably want to, unless you want to modify all groupings) rename to target just the view you're working on (views-view-grouping--view_machine_name--display_id.tpl.php or the like). If you're ok with targeting the way ALL groupings are rendered, the theme function that @ladybug mentioned should do the trick too.
In fact, I created a views-view-grouping--view_machine_name--display_id.tpl.php, which worked great, but then I tried a preprocess function named MYTHEME_preprocess_views_view_grouping__view_machine_name__display_id(&$vars) but it didn't work. I tried getting less specific, like just MYTHEME_preprocess_views_view_grouping__view_machine_name(&$vars) but to no avail. Only the MYTHEME_preprocess_views_view_grouping(&$vars) works from what I tried:
Finally, note that there is a known bug that is being worked on, where $vars['grouping_level'] is always 0 to the template from the preprocess function above. #1488744: Grouping level is always zero in views_plugin_style::render_grouping_sets() has a reasonable approach to handle in your theme and patches underway.
Comment #30
scotwith1tAlso, while I'm here, any ideas how to get a count of the groups? I don't see any way to do so at first glance...
Comment #31
andrezstar commented#15 +1 cool
Comment #32
Dima DD commentedRegarding formatting titles of the 1-st (outmost) grouping level in multi-level grouping case, my solution: I've used firebug and noticed that they have css class="view-grouping-header". This class is used in views-view-grouping.tpl.php (and in theme.inc as well). So I've simply declared this class in vews.css (just for testing) and set desired font setting there, and now my 1-st level titles looks great.
Comment #33
philyWhy not rewrite the output of the field that is used for grouping, wrapping it with the required HTML tags?
No hook nor template nor extra module needed (at least with Views 7.x-3.18).
This also works for multiple groupings: rewrite each field output as wished.
Comment #34
millionleaves commentedRe: #33 - I am doing that, but all the rewriting is being wrapped in a H3 tag. My rewriting is in a custom field which is used as the grouping field. @PhilY - how did you get it working?
Comment #35
phily@millioleaves: on the view's fields list, edit the one you wish to use for grouping to rewrite its output to (for example):
<h2>[node:field_myfield]</h2>. Usually, you would also hide that field.Then, when you use it for grouping, it outputs as rewritten rather than with native
<h3>wrapper.Comment #36
talisa1987 commented#12 Simple and easy solution of the problem. Thank you very much Travis. You saved my time
Comment #37
eigentor commentedAs of today the issue dawehner created did not get into core.
#15 appears to be the most manageable workaround with the least tradeoffs.
Comment #38
ErnoVanhala commentedI stumbled upon this issue now. I have to say that this really sounds strange that you have no way to select the tag for grouping when you have it with normal fields. And then there is forced H3 for the first last grouping item.
How in the Earth this kind of thing has passed testing years ago and is still not fixed? :)
Comment #39
liam morlandThe
h3should not be hard-coded. Will the maintainers accept a patch that makes the grouping element be configurable?Comment #40
GuitarKat commentedh3 should not be hard-coded, I agree. I have found a workaround since then by applying a class on the text affected by it via a custom field. It is so strange.
Comment #41
chris matthews commentedI just ran into this myself in Drupal 8 core Views UI. There is probably very little chance this will get 'fixed' in Drupal 7 contrib Views so updating the IS accordingly.
Project: Drupal core
Version: 9.1.x-dev
Component: views_ui.module
Comment #42
kevinhbruce commentedChiming in with this, as well. I also just ran into this. Although, I found that the previous dev hardcoded it. I'd love to be able to delete this comment now, but it seems that's not an option.
Comment #43
mmlmitchell commentedHere's a work-around for this pesky problem...
</h3>, which cancels the troublesome html elementExample:
The grouping field has the machine name of "field_model_component".
The override text =
</h3><div class="my-style">{{ field_model_component }}</div>Comment #44
liam morland@#43: This likely works visually in many themes, but it would result in invalid HTML and would have accessibility problems due to the empty header element.
Comment #47
dalemoore commentedI've solved this for years using the template copy method in D7, but also never understood why you can change the H-level in the field UI but not for the grouping. I ran into it yet again just today and so came back to see if anyone else had recently posted. 😄 IMO, headings should always be configurable, whether in a field, a block, view, layout builder, whatever for proper outline/accessibility.
Comment #48
chrisgross commentedI just ran into an issue in Drupal 8.9 where I cannot override the views grouping template at all if I don't have at least two grouping levels. views-view-grouping.html.twig does not seem do anything at all in this situation, nor can I trigger template_preprocess_views_view_grouping(). If I use two grouping levels, the second one does not have a template that I can override. This seems similar to what scotwith1t mentioned in #28, but his solution appears to have been for D7 and I cannot find a corresponding workaround for D8.
If I enable the twig markup debugging, it says the grouping title uses views-view-field.html.twig, but there does not seem to be any actual grouping going on in the templates at all. I don't have an h3 at all to remove, but I desperately need to be able to wrap field groupings in custom markup and I cannot. Has anyone discovered a similar workaround for this? Drupal's theme layer is basically telling me that the grouping I set in the views UI is not actually a grouping. It is maddening.
Comment #49
chrisgross commentedSo far, the only simple workaround I've found is to add a dummy custom text field to the view, hide it from display, and use that as the first grouping level. Then, the real group I actually wanted to create can be grouping level two and Drupal will let me theme that.
Alternatively, you can edit your twig template, in this case,
views-view-unformatted.html.twigand do some complicated logic where you repeatedly check the condition{% if view.style_plugin.options.grouping %}and then insert and modify whatever markup is needed to properly group things together. For second level grouping and deeper, you'd still have to modify
views-view-grouping.html.twig.But this seems like a really bad bug that needs to be fixed. I imagine it shouldn't be so confusing to figure out that grouping is treated differently depending on the grouping level and then come up with completely different approaches.
Comment #52
brianbrarian commentedThe Semantic Views contrib module mentioned in #14 seems to work as a workaround, as long as you want your view to display as an unformatted list or html list. And I was able to use CSS to make an unformatted list in a Semantic Views Style display look like a multi-column vertical-alignment grid display.
But I'm a +1 that this needs to be fixed in core.
Comment #57
carlygerardComment #58
carlygerardComment #60
laura.gatesIs it possible for this to be back-ported to 9.4.x? I'm running into an issue that I think this issue resolves where grouping by a date field results in duplicate content because when editing the views-view-unformatted.html.twig file it thinks that
is the title field, when in fact it's the grouped by field. Thus making it almost impossible to then create a
{% for row in rows %}loop.Comment #61
carlygerardHi Laura, since this is a new feature, Drupal recommends we develop for 10.1.x (see comment #59), so our team can't backport this fix to 9.4.x. If you have the dev time and need this for your site, you're welcome to use the dev branch as a baseline and make a custom 9.4.x patch for your site and/or theme.
Comment #65
carlygerardComment #70
carlygerardComment #71
carlygerardComment #72
carlygerardComment #73
lendudeJust a warning, since I have no idea what the actual state of this is, the MR currently contains a massive amount of unrelated code clean up, if this is to have any chance of landing those need to be removed.
Comment #74
carlygerardThanks for taking a look and giving the pull request a review @lendude. I think "needs work" as a status makes sense for now--it is an active ticket but the next major task on our list is writing tests, and I think there's redundant line cleanup I agree needs to happen before we go on to that step (it seems like there were some rebase/conflict issues I missed, causing the repeated lines).
Some code changes, though, are based on results we get from running the PHPCS Drupal standard, would you consider that "unrelated code"? When we run Drupal PHPCS on the 10.1.x version of Grid.php on line 64, for example, we get the following error (this becomes line 71 with the MR 2922 changes):
FILE: [base-path]/test-drupal10/web/core/modules/views/src/Plugin/views/style/Grid.php ----------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------- 64 | ERROR | The array declaration extends to column 96 (the limit is 80). The array content should be split up | | over multiple lines -----------------------------------------------------------------------------------------------------------------Since we're developing on this file and should push code that meets Drupal's coding standards, it seems like it would be our responsibility then to help get the newer version of the file up to standard. Agreed all of our new code should follow that standard, but if there are minor changes like that one (1-5 lines tops), should we not get the code syntax up to standard as well?
Comment #75
carlygerardComment #76
carlygerardI will write the change record for this ticket.
Comment #77
themusician commentedComment #78
mgiffordI think this would apply to WCAG SC 1.3.1
Comment #80
carlygerardThis patch file re-rolls previous MRs from Gitlab workflow as a patch file for 11.x Work still needs to be done in figuring out caching so the wrapper tag option is stored properly. A new patch is needed once that's addressed.
Comment #81
carlygerardShould fix Drupal command fails in 11.x re-roll patch from #80.
Comment #83
themusician commentedIt appears the patch was applied cleanly. There is what seems to be an unrelated error in a unit test when testing the merge request.
https://git.drupalcode.org/issue/drupal-1383696/-/jobs/1255878
Drupal\Tests\editor\Functional\EditorSecurityTest 0 passes 1 exceptions
FATAL Drupal\Tests\editor\Functional\EditorSecurityTest: test runner returned a non-zero error code (2).
Drupal\Tests\editor\Functional\EditorSecurityTest 0 passes 1 fails
Comment #90
acbramley commentedAll old MRs and patches are now hidden, work should be continued on https://git.drupalcode.org/project/drupal/-/merge_requests/7351
Comment #92
themusician commentedNew code appears to be passing.
Comment #93
smustgrave commentedLeft some comments.
Didn't check but if any of those templates are declared in a theme in core they'll have to be updated too.
Definitely will need a CR and probably submaintainer sign off
Comment #95
carlygerardThe MR is now passing with the latest changes as requested (with some allowed fails in the pipeline). Updating status for the next stage of review.
Comment #96
smustgrave commentedMoving to NW for the change record
But question what will happen if $usesGroupingLabelElement isn't present. Lot of contrib plugins will take a while to update.
Comment #97
themusician commentedThank you for the feedback.
To answer your question about if a view does not have $usesGroupingLabelElement present, the twig templates handle that logic and print the title. https://git.drupalcode.org/project/drupal/-/merge_requests/7351/diffs?co...
If it is present, such as after this patch is applied, but not set, the code supports the current default of the grouping label being an h3 or empty.
https://git.drupalcode.org/project/drupal/-/merge_requests/7351/diffs?co...
Contrib plugins would have an option of using this way of handling additional HTML options or could continue doing it however they currently make it happen.
There are a few of the core themes that use the twig template overrides for views-view-unformatted.html.twig, views-view-list.html.twig, and a few more. You suggest updating these in this same patch. As I understand it, the twig templates would be updated where appropriate for claro, olivero, stark, and starterkit_theme but not stable9. The same approach would be for engines/twig excluding updates to stable9. Is that correct?
Comment #98
themusician commentedComment #99
themusician commentedGood morning,
I have authored a proposed change record for review by others. https://www.drupal.org/node/3446094
I have also pushed an updated branch that includes theme updates to the core themes where the views templates are included. I did not, however, update Stable 9 as my understanding is that the Stable 9 theme is locked in place. I am happy to make the changes there if required.
Comment #100
smustgrave commentedWent to review but appears MR has some failures
Comment #101
themusician commentedThe test had been failing due to this upstream bug, that has now been fixed. Thanks to nicxvan and mikelutz for troubleshooting over in #contribute on Slack.
Resolved bug that was causing test failures: https://www.drupal.org/project/drupal/issues/3448036
Tests are now passing.
Comment #102
nicxvan commentedCoincidentally I just needed this patch myself. I suspect that this will need to add something to the ViewsConfigUpdater since it is adding config to Views.
I did this earlier this year and it can be quite complex, I'm working on documenting it here #3447755: Document ViewsConfigUpdater
I'm not sure why tests are not triggering on the changed config already, maybe cause it's a sub item under grouping, but this adds new config: grouping_label_element: h2.
I'm also not sure why it wouldn't be limited to heading tags like the views pager update linked in the documentation issue.
I'm happy to help guide someone on the views update config changes since I know it's a pretty significant wrench in the process.
This may need additional tests too.
Comment #103
nicxvan commentedIt might be helpful to add an example of views-view-grouping.html.twig in the change record too since the starterkit theme generation is different than the example.
Comment #104
nicxvan commentedI am also getting this on pages with this patch, I think on views without a grouping set:
Undefined array key "grouping_label_element" in Drupal\views\Plugin\views\style\StylePluginBase->renderGroupingSets() (line 559 of core/modules/views/src/Plugin/views/style/StylePluginBase.php).
Comment #105
themusician commentedThanks for the feedback. I agree that the undefined array key error is because the views did not get the update to set grouping_label_element to null.
The ViewsConfigUpdater code requirement makes sense to me as being necessary. On a separate issue, https://www.drupal.org/node/2770835, the test update never fires even though I wrote a function in ViewsConfigUpdater but I was not aware you have to also call the function in updateAll(). The documentation improvements for how to use ViewConfigUpdater is a great idea.
Here is a rough idea of what I think is needed. @CarlyGerard also involved with this ticket walked me through what this may end up requiring. In the protected function addGroupingLabel() I can't quite figure out what the handler represents. The parameter defines it as a display handler, so I think a view style is represented here as the handler_type "style" and that is also the plugin_id? These ideas came from one of the issues you referenced, thank you for the pointer - https://git.drupalcode.org/project/drupal/-/blob/96d21a4603df23080a34051....
You asked, why the allowed grouping elements would not be restricted to just heading tags like the views pager update. For the grouping use cases, grid, HtmlList, GridResponsive it seemed hard to predict that one would only ever group by heading. Using labelELements, https://git.drupalcode.org/project/drupal/-/merge_requests/7351/diffs#11..., makes it so available elements do not need to be maintained in this code as well as the views.settings. I concur that the most common use case would be headings but I am not confident that there would never be a need to group by another element.
Thanks again for the feedback, the questions, and the guidance.
Comment #106
nicxvan commentedAt a quick glance that looks right: also if you want to link an issue in a comment where the issue status color comes up can you use:
[#issuenumber]
like this #2770835: Add support for tables with two headers in views table display
Comment #109
themusician commentedI believe the ViewsUpdateConfig functions now are properly looping through existing views and setting the grouping to the default if it is not already set.
If using grouping on existing views, the default is the h3 element as it is already set to, after the config update executes.
Comment #110
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #112
robcarrI'm unable to apply the MR as a patch against 11.x
Comment #116
ehlovader commentedWell I tried rerolling the MR but ran into a bunch of PHPCS and PHPStan errors in the build, but locally they aren't detecting any issues when I run them for Drupal standards. In addition to that the patch won't apply normally.
I believe some of my trouble applying the patch locally despite the phpcs stuff is related to rebasing across a rewrite to use class based hooks.
I'll keep looking into it, started to rebase on a new branch but was still on the main branch shown, maybe I will look into that new branch again to try and avoid introducing more issues.
When I did get the patch applied though I saw the dropdown for group markup, but I think I lost the multiple grouping levels that I'd expected.
Comment #117
ehlovader commentedJust pushed the original back to 39368b50 from another branch, I will continue trying to rebase from the other 11.x branch I started
Comment #120
ehlovader commented@robcarr confirmed the reroll of this fix onto 11.x in MR !15366 works on 11.3, and patches cleanly.
There are a lot of PHPCS constraints added to main that will require some work to clean up and make this mergable there.
Comment #121
themusician commentedHow exciting to see movement on this again. Thank you for pushing this along.
Comment #122
ehlovader commentedIt does appear that there was more to the refactoring of
addGroupingLabelElementthan just getting it to use an array format for the display handler and styles values.The structure of the style config appears to have changed and is deeper than it was. it was no longer just grouping_label_element but now has more and multiple group levels.
I also found that this has no effect on HTML Lists in the Bootstrap5 theme, the views-view-list template is overridden there and is also hardcoded with an
h3I might take a closer look at the display handler structure, see if it is an easy fix, but the theme situation feels like more of a blocker to me right now