getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.31k stars 168 forks source link

Dropdowns display focus border after opening #5965

Open gbdesign2023 opened 11 months ago

gbdesign2023 commented 11 months ago

Description

The representation of the active language in the drop-down menu is confusing, as the first language is outlined and displayed in bright white. The active language, on the other hand, is displayed in an inconspicuous color. I have also noticed that the first element in a drop-down menu is always displayed with a blue border.

Expected behavior
A neutral representation without preselection would be more logical, as is the case with Kirby 3.

Screenshots

Kirby 4: Active language (EN) in the drop-down menu

language

Kirby 4: drop-down menu

drop-down1

Kirby 3: drop-down menu

drop-down2

Your setup

Kirby 4 RC1 starterkit

Your system

lukasbestle commented 11 months ago

I guess this is because the dropdown pulls the keyboard focus when it is opened. When the dropdown was opened with the keyboard this makes sense, but maybe we could avoid that behavior for mouse navigation.

distantnative commented 11 months ago

I honestly think it's a bigger accessibility advantage of v4 over v3 that it more consistently shows the current focus.

bastianallgeier commented 11 months ago

I agree with Nico. I see this as a huge improvement.

nilshoerrmann commented 11 months ago

I think the problematic point is not the focus ring which is a great improvement but that the active state is unclear in comparison: the focus ring is way bolder than the active state. This issue should not be closed in my eyes because this is a real usability issue when editing a site with two languages.

distantnative commented 11 months ago

But isn't the way stronger indicator for the current language that the whole button says it?

gbdesign2023 commented 11 months ago

I think the problematic point is not the focus ring which is a great improvement but that the active state is unclear in comparison: the focus ring is way bolder than the active state. This issue should not be closed in my eyes because this is a real usability issue when editing a site with two languages.

That was exactly my intention in reporting this anomaly here. Since I don't use keyboard navigation, the visual highlighting was confusing for me at that moment. I could not associate the framing with keyboard navigation. Accessibility is a useful function for all those who see added value in it. However, an advantage is not generally an advantage for everyone. As a compromise, the option to enable/disable this feature in Config.php would be desirable.

nilshoerrmann commented 11 months ago

But isn't the way stronger indicator for the current language that the whole button says it?

@distantnative, looking at this screenshot I cannot tell which language is currently selected:

grafik

Visually, I'd say the active language is German which is also currently focussed. From using Kirby I know it's English but that's not what I see.

gbdesign2023 commented 11 months ago

If accessibility is an important argument, wouldn't the use of colors be an additional argument? There are many people who cannot perceive colors properly. The bright blue has no signal effect here, but the frame does.

I created a custom-panel.css for the panel:

panel

And I designed the language selection in the frontend like this:

backend
afbora commented 11 months ago

I agree with author and Nils. Especially language dropdown focus behavior very confusing.

nilshoerrmann commented 11 months ago

I think a selection indicator that's not color based might help here because the color makes the active item step back visually. Example how Linear and other do this with a checkmark:

grafik

https://linear.app/blog/invisible-details

nilshoerrmann commented 11 months ago

Similar example from Height for reference: https://height.app/blog/guide-to-build-context-menus#delay

gbdesign2023 commented 11 months ago

You can even find a comparable example here on Github. In the keyboard navigation, only the background color changes, without additional framing.

github-dropdown