Bug 2145219 - Mnemonics are not visible with gtk-hint-font-metrics (enabled by default in Fedora 37) in GTK4 apps
Summary: Mnemonics are not visible with gtk-hint-font-metrics (enabled by default in F...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: pango
Version: 38
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peng Wu
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F38FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2022-11-23 14:37 UTC by Kamil Páral
Modified: 2023-02-21 09:18 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-02-21 09:18:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNOME Gitlab GNOME gtk issues 4818 0 None opened gtk-hint-font-metrics: Underline for mnemonics not visible 2022-11-23 14:37:46 UTC

Description Kamil Páral 2022-11-23 14:37:46 UTC
Description of problem:
In bug 1943794 we enabled gtk-hint-font-metrics in gtk4 by default. However, due to a bug in gtk4, it means that mnemonics (underlines under letters in buttons/menu items/configuration when you press Alt, to act as a quick or keyboard only access) are not visible in any gtk4 application. See:
https://gitlab.gnome.org/GNOME/gtk/-/issues/4818
https://gitlab.gnome.org/GNOME/gtk/-/issues/5187

That's quite a problem, because it breaks accessibility a lot. Mnemonics are frequently used even by regular users to speed up access (e.g. Alt+F to show the File menu, Alt+O to press the Open button, etc), but they are essential for people unable to use a mouse. It takes much more effort to use Tab to cycle the focus through all available widgets, and sometimes it's not even possible to reach the desired widget just by cycling the focus with Tab).

Note: This only affects GTK4 apps. Older GTK apps are not affected.
Note 2: The mnemonics themselves work OK. You just don't know what to press. Rendering of the underline is broken, not the actual mnemonics functionality.

You can easily test this by opening gedit (gtk3) and pressing Alt -> the Open and Save buttons shows mnemonics. Then open gnome-text-editor (gtk4) and press Alt -> the Open button doesn't show mnemonics (but Alt+O works). In gnome-contacts, if you hit the + button, there are Cancel and Add buttons in the title bar, none of each render mnemonics correctly. In Nautilus, if you open any of its menus and press an arrow key (instead of Alt, because reasons [1]), you'll not see any mnemonics when you should.

As a workaround, if you create ~/.config/gtk-4.0/settings.ini with this content:
[Settings]
gtk-hint-font-metrics=0

and re-log in, you'll see that mnemonics start to work again in all cases described above.


[1] https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5034

Version-Release number of selected component (if applicable):
gtk4-4.8.2-2.fc37.x86_64  (and also earlier, most probably)

How reproducible:
always

Steps to Reproduce:
1. open gnome-text-editor
2. press Alt
3. see that O in the Open button doesn't get underlined when it should

Comment 1 Kamil Páral 2022-11-23 14:38:41 UTC
Proposing for a blocker discussion.

Comment 2 Ben Cotton 2023-02-07 14:59:43 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.

Comment 3 Kamil Páral 2023-02-21 09:13:38 UTC
This is fixed in pango 1.50.13 [1], we just need a Bodhi update.

[1] https://koji.fedoraproject.org/koji/buildinfo?buildID=2155874

Comment 4 David King 2023-02-21 09:18:23 UTC
That build is already tagged into F38 and the F39 one for rawhide, so will be in the next push to mirrors.


Note You need to log in before you can comment on or make changes to this bug.