Problem/Motivation

Followup from #3615331: Invalid ARIA attribute aria-toolbar-link__labelledby on toolbar menus strips their accessible name.

We need to see if menu-region--middle.html.twig and menu-region--top.html.twig are ever in use. If not, we can remove them

Steps to reproduce

NA

Proposed resolution

Remove menu--region[bottom, middle, top]

Remaining tasks

None

User interface changes

NA

Introduced terminology

NA

API changes

NA

Data model changes

NA

Release notes snippet

NA

Issue fork drupal-3619804

Command icon 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

mherchel created an issue. See original summary.

f0ns’s picture

They seem to be unused.

All three came in with the Gin merge (9fc3187d, #3556948) and were never wired up: default_admin declares no hook_theme(), and its hook_theme_registry_alter() repoints only toolbar and menu__toolbar at templates/navigation.

The navigation module's hook_theme() registers top_bar*, block__navigation, navigation_menu, navigation_content_top and navigation__messages — no menu_region base hook, so there's nothing for menu-region--top/middle/bottom to attach to.

Nothing includes them from Twig either.

Worth adding menu-region--bottom.html.twig to the scope, looks like that is the same situation.

f0ns’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs issue summary update

Can we update the issue summary to still follow the standard issue template please. To include your findings.

Since they're not used probably safe to go ahead and remove them.

longwave-bot made their first commit to this issue’s fork.

longwave’s picture

Looks like these two are also unused?

core/themes/default_admin/templates/page/page--clone.html.twig
core/themes/default_admin/templates/page/page--group.html.twig
longwave’s picture

Status: Needs work » Needs review
smustgrave’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs issue summary update

Cleaned up the summary LGTM.

catch’s picture

Status: Reviewed & tested by the community » Needs review

This doesn't account for #7 - are we going to include those here or open a new issue? For me I'd include them here if they're dead code and just remove 'menu' from the issue title.

f0ns’s picture

Re #7/#10: the page templates aren't unused in the same way.

These page templates are picked up automatically from the URL.

Visit /group/1 and Drupal looks for page--group.html.twig on its own, no theme hook needed. Core has no /group or /clone paths, but the Group and Quick Node Clone contrib modules do, and both templates apply the node edit layout to those pages.

So deleting them changes how those sites look.

The menu region templates have no such fallback and can never render.

I'd keep this issue to those, and open a separate one for the page templates or add them here if we prefer, but then it's an intentional change for contrib, not just cleanup of unused stuff.

longwave’s picture

Support for contrib modules should not be in core: it's up to contrib modules to provide their own templates. This was different for Gin when it was in contrib, which is where these templates come from.

smustgrave’s picture

I also marked it fine as I thought since it’s experimental theme we had more leeway

f0ns’s picture

You are right.

I've broadened the scope and pushed the removal of page--clone.html.twig and page--group.html.twig to the MR.

It would be good to indeed update the issue title accordingly, since it no longer only covers the menu region templates. Thanks!

f0ns’s picture

Title: Determine if menu templates are in use by Admin theme » Remove unused templates from the Admin theme
f0ns’s picture

Also removed input--submit--paragraph-action.html.twig.

It only overrides the input__submit__paragraph_action suggestion, which comes from the contrib Paragraphs module, paragraph_action appears nowhere else in core.

f0ns’s picture

I also opened #3621155: Remove contrib-specific selectors from the Admin theme CSS as a follow-up. The same contrib leftovers exist in the theme's CSS (Paragraphs, Smart Date, Inline Entity Form, Views Bulk Operations, plus some unused contrib toolbar icons).

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Nice fine, lets ship this one.

  • amateescu committed c24fd0db on 11.x
    task: #3619804 Remove unused templates from the Admin theme
    
    By:...

  • amateescu committed 41e2e84c on main
    task: #3619804 Remove unused templates from the Admin theme
    
    By:...
amateescu’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 41e2e84c1b4 to main and c24fd0dbd44 to 11.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.