ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Potential UX/accessibility bug: dropdown menu item focus does not follow pointer hover after the dropdown is opened with the mouse.

Open DNWEIJ opened this issue 3 months ago • 3 comments

Hello,

I used the example page to show the issue: https://ckeditor.com/ckeditor-5/demo/html-support/

In general, dropdowns show a focussed (first) item. Sometimes this is ok. For example if there is an actual 'selected' like 'current font size' or 'current style type'.

As an example to describe my point i use the 'inserting an image' dropown: Image

I have three options, where the first option is 'selected' or 'focussed' there is a blue border. I understand that this is done for keyboard support (arrow up/down move the focussed )

However, using only the mouse, this is highly confusing and seems a UX point. I click to open the dropdown, first element is selected, i go down with my mouse, the first element is still selected.

I was expecting that the 'selected' item would follow the mouse OR that there is NO selected if this doesn't make sense and i am only using the mouse.

given: Image

So now the mouse hovers on the last element, still the first element is selected.....what is the state at this moment and what is the expectation i should have as a user.

Moreover: Opening the dropdown with the mouse should imho NOT set 'focused' to the frist element is there is in effect NOT an item that is relevant...the user should explicitly choose the option he needs, without a PRE focused one....

Specifically with creating a specific dropdown for an application element (so outside the given ckeditor dropdowns) It seems strange the user has a pre-selected option. This means the user isn't REQUIRED to select an option (since there is already a focus)

Maybe i do not fully understand the API for building dropdowns, but i could not find any element to remove the focus. I also feel within ckeditor dropdowns it is confusing when there is really not an initial option....

DNWEIJ avatar Aug 23 '26 12:08 DNWEIJ

Hi @DNWEIJ, thank you for the detailed write-up. You've described the problem well and we understand why the behavior feels unclear when you're working with the mouse. Accessibility and a predictable interface matter a lot to us, so this is valuable feedback and we'll take a proper look at it. I can't promise anything specific at this stage, but the issue stays open and on our radar.

Thanks again for taking the time to report this.

jacek-cke avatar Aug 25 '26 13:08 jacek-cke

Still reproduces on ckeditor.com today (2026-09-03, Chromium 151, 1280×720):

  1. Open https://ckeditor.com/ckeditor-5/demo/html-support/
  2. Click the Heading 1 dropdown in the toolbar to open the options list.
  3. Move the mouse down to Heading 2, then further to Heading 6.

What happens: the blue focus outline stays on Heading 1 the entire time — it does not move to whichever item the pointer is over. Each hovered item shows a hover highlight, but the first-item focus ring never clears.

Recording with timestamps: https://scenerecap.com/s/reui36rvs6

scenerecap avatar Sep 03 '26 09:09 scenerecap

I have one more question about the UX/accessibility of this dropdown.

As DNWEIJ, the author of the issue, said:

"I understand that this is done for keyboard support (arrow up/down move the focused [item])."

However, this doesn't seem to work as expected.

On the HTML Support demo page and in the tests at packages/ckeditor5-image/manual/imageinsert.manual.html, the dropdown can only be navigated using Tab. This behavior is also described in ckeditor/ckeditor5/packages/ckeditor5-image/src/imageinsert/ui/imageinsertformview.ts.

On the other hand, onpackages/ckeditor5-code-block/manual/codeblock.manual.html, we have a similar list for selecting the language in which to insert a code block, and there the list can only be navigated using the arrow keys.

This seems a bit inconsistent. Is this behavior intentional and working as expected, or should I open a separate issue for it?

VladyslavLevoshko avatar Oct 01 '26 14:10 VladyslavLevoshko