Focus on the alert text when there is an error

This is to tell screen readers that have to read the text in the
notification, or the notification pops up and orca, at least, does not
know that it needs to read it.

I also had to change the role of SelectableLabel’s TextArea to
StaticText or orca would only read the first line. Not sure if that is
an error, because TextArea does indeed behave like a StaticText (i.e., a
label) in this case, but TextArea has Accessible.multiLine set to true.
This commit is contained in:
jordi fita mas 2024-12-30 10:31:14 +01:00
parent f77d01134b
commit 87f51e733e
2 changed files with 5 additions and 0 deletions

View File

@ -45,6 +45,8 @@ Control {
id: label
Accessible.ignored: !control.visible
Accessible.role: Accessible.StaticText
focus: control.visible
anchors {
left: parent.left

View File

@ -10,6 +10,9 @@ Control {
contentItem: TextArea {
id: textArea
Accessible.ignored: control.Accessible.ignored
Accessible.role: control.Accessible.role
focus: control.focus
padding: 0
readOnly: true
selectByMouse: true