Admin toolbar search shortcut should be disabled by defsult

Created on 16 August 2025, 8 days ago

Problem/Motivation

Keyboard shortcut introduced in https://www.drupal.org/node/3494646 is great feature that makes work bit faster, however chosen shortcut (alt+a) has very negative impact on websites in Polish. This is because alt+a is widely used for typing Polish character "ą".

I've read through the original issue and I think it's good that the option to disable the shortcut was introduced - this can solve the issue for Polish websites.

However, I think it should be disabled by default. Otherwise, upgrading Admin Toolbar introduces regression - because of the update, editors are loosing basic CMS functionality - writing. This is fine if the issue is spotted before website is released to production, during the tests. But it can cause a lot of problems if not spotted before - and CMS authors/editors, impacted by this, may not have the right permissions to change this settings immediately.

Steps to reproduce

  1. Install or upgrade Admin Toolbar to 3.6.0 or higher
  2. Try to type Alt+a (having Polish keyboard set in your system) in any of Drupal text fields

Proposed resolution

I believe option "Enable keyboard shortcut (Alt + a)" in Admin Toolbar Search settings should be disabled by default. This way it can be used if website owner wants that, but it wouldn't cause unexpected problems.

🐛 Bug report
Status

Active

Version

3.6

Component

Code

Created by

🇵🇱Poland besek

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @besek
  • 🇩🇰Denmark ressa Copenhagen

    Thanks for raising this issue @besek, there has previously been a challenge with the Polish character of "ś" and Alt+s (Option+s) as mentioned in Allow shortcut key to be configurable Active .

    Would it be possible to detect the system language, and display a warning like below if Polish language is detected AND shortcut Alt + a is enabled?

    It looks like your system language is Polish, which can conflict with the Admin Toolbar Search shortcut Alt + a.

  • 🇵🇱Poland besek

    Unfortunately not. This is not only about system language, but about keyboard layout. And browser is not exposing this information to the website. Language itself is not reliable informaiton, because users may have keyboard layout different than system language.

    I think, as a rule, Alt shouldn't be used for letter shortcuts. Polish is just example, but more regional keyoboard layouts are using AltGr as a modifier for other letters, to create special characters.

    So, in my opinion there are options to fix this:
    1. Ideal: we would need different shortcut (with Ctrl/Cmd, but yeah, I realize finding one that is free may be close to impossible)
    2. Disabling this setting by default - the quickest fix that may still deliver this functionality, but for site owners who would turn this on intentionally - otherwise it may cause problems for content editors
    3. Probably the most complicated: change behavoior of this shortcut to be fired only when user is not typing in any editable fields.

    Also, I noticed when this setting is disabled - there is still informaiton about shortcut visible in the search field and it should be disabled. Not sure if this deserves separate issue?

Production build 0.71.5 2024