Every Drupal fix we catalog
SEOLZ catalogs 5 fixes for Drupal across 4 areas — SEO, answer-engine readiness, accessibility, security and site-health. Each lists the exact steps for Drupal, with a link to the official docs.
Answer Engine Optimization · 1 fixes
Missing schema howtoModerate effort
Add HowTo and BreadcrumbList structured data (JSON-LD) to pages that contain step-by-step instructions so Google can display them as rich results and answer-engine snippets.
On Drupal
- Install the 'Schema.org Metatag' module or 'Metatag' module with the JSON-LD submodule from drupal.org.
- Configure schema mappings for the relevant content type (e.g. 'How-to Guide') under Configuration › Search and Metadata › Metatag.
- For HowTo, you may need a custom module or a preprocess hook in your theme's .theme file to build the JSON-LD array and attach it via #attached['html_head'] on the relevant node type.
- BreadcrumbList is handled by the 'Simple XML Sitemap' or Metatag modules, or via a custom hook_preprocess_page().
- Validate with Google's Rich Results Test.
Accessibility (WCAG) · 2 fixes
Aria command nameModerate effort
Add a discernible, screen-reader-accessible name to every button, link, and menuitem that uses an ARIA command role so assistive technology can announce what it does.
On Drupal
- In Drupal admin, go to Appearance and identify your active theme.
- In your custom or sub-theme, locate the Twig template file responsible for the unlabelled element (e.g., button.html.twig, menu.html.twig).
- Add `aria-label="{{ 'Descriptive action'|t }}"` to the element tag (using Drupal's translation function for internationalisation). Add `aria-hidden="true"` to decorative SVGs.
- Rebuild the Twig cache (Configuration → Development → Performance → Clear all caches, or `drush cr`) and verify with axe DevTools.
ListModerate effort
Fix all HTML list elements so that `<ul>` and `<ol>` contain only valid `<li>` children, and `<li>` elements appear only inside a proper list container, ensuring correct semantic list structure throughout your store.
On Drupal
- Broken list markup in Drupal usually originates in a Twig template. Find the relevant template in your theme's 'templates/' folder (e.g. 'menu.html.twig', 'item-list.html.twig').
- Open the template and verify that any <ul> or <ol> loop outputs <li> wrappers correctly: {% for item in items %}<li>{{ item.content }}</li>{% endfor %}.
- If the issue is in a contributed module's template, copy the template into your theme's templates directory (Drupal's template override system), then fix it there.
- Run 'drush cr' (cache rebuild) or go to Configuration → Performance → Clear all caches, then re-audit the page.
Security (OWASP) · 1 fixes
Info disclosure x powered byQuick win
Remove or mask the X-Powered-By HTTP response header to stop advertising your server technology stack to attackers.
On Drupal
- In your sites/default/settings.php or a custom module's hook_boot(), call `header_remove('X-Powered-By');` or use `drupal_add_http_header('X-Powered-By', '');`
- Install the 'Security Kit' (seckit) module from drupal.org: Admin → Configuration → System → Security Kit — it provides options to strip information-disclosure headers.
- For Apache: Add `Header unset X-Powered-By` to your .htaccess or VirtualHost config.
- For Nginx: Add `more_clear_headers 'X-Powered-By';` to the server block.
Site Lifecycle · 1 fixes
Cms versionModerate effort
Identify your ecommerce platform and CMS version, then ensure it is always kept up to date to protect your store from security vulnerabilities and avoid loss of vendor support.
On Drupal
- Log in to Drupal Admin → Reports → Available Updates to see your current Drupal core version and available updates for core and all modules.
- Apply updates using Composer: `composer update drupal/core --with-all-dependencies`, then run `drush updatedb` or use the web-based update script at /update.php.
- Enable the Update Manager module (Admin → Extend) to receive in-dashboard update notifications.
- Review Drupal's Security Advisories page and subscribe to security email alerts for your installed version.