Commit 95ee796e authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Mark hint label and error label as related labels

Setting the input widget as buddy of the labels ensures that the labels
are not considered as unrelated labels by assistive tools. This prevents
at least orca from reading the hint text as part of the dialog text.

GnuPG-bug-id: 5916
parent fac8b186
Pipeline #163981 passed with stage
in 2 minutes and 11 seconds
......@@ -322,8 +322,12 @@ void FormTextInputBase::setWidget(QWidget *widget)
d->mLabel->setFont(font);
d->mLabel->setBuddy(d->mWidget);
d->mHintLabel = new QLabel{parent};
// set widget as buddy of hint label, so that the label isn't considered unrelated
d->mHintLabel->setBuddy(d->mWidget);
d->mHintLabel->setVisible(false);
d->mErrorLabel = new ErrorLabel{parent};
// set widget as buddy of error label, so that the label isn't considered unrelated
d->mErrorLabel->setBuddy(d->mWidget);
d->mErrorLabel->setVisible(false);
connectWidget();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment