LB Tabs & Accordion adds a single Layout Builder section plugin that splits its content into labelled sub-sections, displayed either as tabs or as an accordion.
Each sub-section is a real Layout Builder region, so an editor places any number of blocks into it exactly as in any core layout. The section configuration form lets a site builder pick the display mode, the number of sub-sections (1 to 10), their labels, and reorder them with core's #tabledrag.
Code to review
src/Plugin/Layout/TabsAccordionLayout.php— the Layout plugin: attribute definition,defaultConfiguration(),setConfiguration(),buildConfigurationForm()with an AJAX-rebuilt#tabledragtable,validateConfigurationForm(),submitConfigurationForm().lb_tabs_accordion.module—hook_preprocess_layout()building the ordered sub-section list handed to Twig.config/schema/lb_tabs_accordion.schema.yml— full config schema for the plugin settings.tests/— Unit, Kernel and Functional coverage (13 tests, 103 assertions).
How it differs from similar projects
Several modules already cover tabs and/or accordions in Layout Builder. The differences are deliberate, not accidental:
- Layout Builder: Tabs and Accordion — the closest project. It depends on the contributed
jquery_ui_tabsandjquery_ui_accordionmodules (see itslb_tabs.info.ymlandlb_tabs.libraries.ymlon the3.0.xbranch), i.e. on jQuery UI, which core removed. This module ships no third-party library at all: interactivity is a small vanilla-JSDrupal.behaviorsfile per component, usingcore/onceonly. - Layout Builder Accordion — one block equals one accordion item, with the block title used as the accordion header. Here one region equals one sub-section, so a sub-section can hold several blocks, and its label is set explicitly in the section form rather than inherited from a block title.
- Accordion for Layout Builder — scoped to the YMCA Website Services distribution; accordion only.
- Layout Kit — a broad set of layouts (columns, tabs, accordions, "conmutator") with styling options. This module is the opposite trade-off: one layout, no styling options at all.
Two further design choices worth flagging for the review:
- No style options whatsoever — no colour, spacing, typography or free-form attribute fields. Styling is delegated to UI Styles (its
ui_styles_layout_buildersub-module already adds class pickers to every section and region, including this one, with no code in this module) or to the active theme. Block restrictions are likewise delegated to Layout Builder Restrictions, which can target the stable region namessubsection_1..subsection_10. - Each display mode is a Single Directory Component (
components/tabs/,components/accordion/), so its CSS/JS is attached only when that mode actually renders, and a theme can override either one independently viareplaces: lb_tabs_accordion:tabs.
The markup follows the WAI-ARIA Authoring Practices Tabs and Disclosure patterns (role="tablist", role="tab", role="tabpanel", roving tabindex, aria-expanded). Inside Layout Builder's own edit screen the module detects core's in_preview signal and renders every sub-section at once, reusing core's region styling, so an editor can see which sub-sections already hold blocks without clicking through each tab.
Checklist
- The project is a full project (not a sandbox), created and maintained under my individual account, with the code committed on the
1.0.xbranch. - I do not already have the vetted role, and this is my only open application.
- All code is my own, GPLv2-or-later, with no third-party assets (no vendored JS, CSS or fonts) — nothing that needs a licensing exception.
- No
version:,project:ordatestamp:keys in the.info.yml, and noLICENSE.txtcommitted; both are left to the packager. - The repository contains a README covering introduction, requirements, recommended modules, installation, configuration, theming, an FAQ and maintainers, and the project page carries the same information.
- The GitLab CI pipeline (
.gitlab-ci.ymlwithOPT_IN_TEST_NEXT_MINORandOPT_IN_TEST_MAX_PHP) is green on the branch head: pipeline 945043 —phpcswithDrupal+DrupalPractice,phpstan,cspell,eslint,stylelint,composer-lint, andphpunitacross the three build matrices. - Automated tests: 13 tests / 103 assertions across Unit, Kernel and Functional levels; the Functional test drives the real "Manage layout" admin screens rather than only building objects programmatically.
Comments
Comment #2
vishal.kadamComment #3
avpadernoThank you for applying!
Before giving links helpful to understand how the review process works, what to expect from a review, and what to do to avoid a review takes more time than needed, I would like to thank all the reviewers for the work they do.
These applications are volunters-driven, which also means it is not possible to predict when an application will be marked fixed and the applicant will get the permission to opt projects into security advisory policy. While we aim to make an application as quick as possible, it is also important for us that more people review the project used for an application. In this way, we make sure applications do not miss some important points that should be instead reported.
Applications are not meant to be complete debugging sessions that eliminate every existing bug, though. I apologize if sometimes applications seem to go into too-detailed reviews.
Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.
The important notes are the following.
Keep in mind that once the project is opted into security advisory coverage, only Security Team members may change coverage.
To the reviewers
Please read How to review security advisory coverage applications, Application workflow, What to cover in an application review, and Tools to use for reviews.
The important notes are the following.
For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues.
Comment #4
avpadernoThe comparison with similar projects needs to be part of the project page.