Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.8.2
-
None
Description
import QtQuick import QtQuick.Controls.Fusion Button { text: "Mnem&onic" }
When run using qml, the above snippet will display a button with the label "Mnem+o+nic". When the Button is focused, however, what is actually read out by screen readers like orca is not "Mnemonic" but "Mnem-and-onic".
This breaks the match between default visual and auditory presentation.
It is also not how Browsers behave for assigning default Accessible names in cases of strings containing markup:
<html> <button type="button"><p>Mnem<span style="text-decoration: underline;">o</span>nic</p></button> </html>
is read out as simply "Mnemonic" (Tested using Firefox and Orca on Fedora 41).
This is consistent with the ARIA specifications for Accessible names, which are suppossed to be flat strings that "[do] not contain any markup".
The Mnemonic markup character should not be sent to screen readers, but removed from the label. This could be done by changing the default Accessible.name computation, or by removing markup from the qml Accessible.name property before passing it to screen readers. (The first may break unit tests that reference elements by their name according to the existing computation, and the second introduces a discrepancy between the qml property and the accessibility tree property).