Make it possible to pair Label with components like TextInput
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 827
- Avg merge
- 9h 45m
- Merged PRs (30d)
- 58
Description
### What is the problem or limitation you are having?
Right now, screenreaders can use TextInput fine as a widget, however, they can't determine its purpose for the user. Example, a TextInput can have a label "User name" above itself, but when tabbing through, the screenreader will announce just "text entry", instead of "User name text entry", hiding the purpose of the component from the user.
### Describe the solution you'd like
There should be a way to pair Labels with other widgets like TextInput or MultilineTextInput, so the screenreader could say "User name text entry". For example, with [Gtk Label](https://docs.gtk.org/gtk4/class.Label.html) this can be achieved using the mnemonic widget property.
### Describe alternatives you've considered
There is currently no way to achieve this to my knowledge. Using a placeholder can provide some information, but that's not its intended use-case and will disappear as soon as the user types in anything.
### Additional context
To see this problem in action, you can run the Celsius - Fahrenheit tutorial app, turn on a screenreader (Alt+Super+S for Orca on linux, Ctrl+Win+Enter for Narrator on Windows) and try to use the app from keyboard. The textboxes are announced fine on Linux from my testing (should be similar on win), however the only way you can tell which is for Celsius and which for Fahrenheit is the read-only state of the result.
Contributor guide
Research direction
Start with the Celsius-Fahrenheit tutorial app and reproduce the issue using a screenreader on the reported platforms. Read the TextInput and MultilineTextInput implementations and compare the requested label pairing with Gtk Label's mnemonic widget behavior. Done means an associated label is announced with the text entry's role and remains useful after typing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- accessibility, desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100