Call QAccessible::updateAccessibility when changing accessible name.
Reviewed-by: Jan-Arve (cherry picked from commit e783275cfb71e7325472b3aea54e109a7a854bf7)
This commit is contained in:
parent
74060f05d1
commit
8f5b2faaac
@ -11206,6 +11206,7 @@ void QWidget::setAccessibleName(const QString &name)
|
||||
{
|
||||
Q_D(QWidget);
|
||||
d->accessibleName = name;
|
||||
QAccessible::updateAccessibility(this, 0, QAccessible::NameChanged);
|
||||
}
|
||||
|
||||
QString QWidget::accessibleName() const
|
||||
@ -11227,6 +11228,7 @@ void QWidget::setAccessibleDescription(const QString &description)
|
||||
{
|
||||
Q_D(QWidget);
|
||||
d->accessibleDescription = description;
|
||||
QAccessible::updateAccessibility(this, 0, QAccessible::DescriptionChanged);
|
||||
}
|
||||
|
||||
QString QWidget::accessibleDescription() const
|
||||
|
@ -479,6 +479,11 @@ void tst_QAccessibility::eventTest()
|
||||
QVERIFY_EVENT(button, 0, QAccessible::StateChanged);
|
||||
QVERIFY_EVENT(button, 0, QAccessible::StateChanged);
|
||||
|
||||
button->setAccessibleName("Olaf the second");
|
||||
QVERIFY_EVENT(button, 0, QAccessible::NameChanged);
|
||||
button->setAccessibleDescription("This is a button labeled Olaf");
|
||||
QVERIFY_EVENT(button, 0, QAccessible::DescriptionChanged);
|
||||
|
||||
button->hide();
|
||||
QVERIFY_EVENT(button, 0, QAccessible::ObjectHide);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user