Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-128831

API to specify labeled-by relation

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • None
    • Quick: Controls 2
    • None
    •  

      Example

       

      Text { text: "&Username"; buddy: userNameInput }
      TextField { id: userNameInput }
      

      This is useful for two things:

      1. Improve keyboard navigation. Alt+U will move focus to the item it is buddy for.
      2. Accessibility can query the "logical name" of the TextField, providing more meaningful information to the a11y user.

      Frameworks with similar concept

      Qt

      https://doc.qt.io/qt-6/qlabel.html#setBuddy

      Windows.System.Forms API

      https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.label.usemnemonic?view=windowsdesktop-8.0   (Label.UseMnemonic Property)

      (Uses the tab focus order to find the next focusable item from the label)

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            smd Jan Arve
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes