Fix tree/table/list accessibility state
The accessibility class associated with trees, tables and lists was reporting a default/empty state, causing issues with accessibility tools. Fixes: QTBUG-92964 Pick-to: 6.4 6.3 6.2 Change-Id: I9c8ee5e7e582fd6b6a59cd70437eeddad0f4eb8e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
f082458c46
commit
0d3f09ac02
@ -373,7 +373,27 @@ QAccessible::Role QAccessibleTable::role() const
|
||||
|
||||
QAccessible::State QAccessibleTable::state() const
|
||||
{
|
||||
return QAccessible::State();
|
||||
QAccessible::State state;
|
||||
const auto *w = view();
|
||||
|
||||
if (w->testAttribute(Qt::WA_WState_Visible) == false)
|
||||
state.invisible = true;
|
||||
if (w->focusPolicy() != Qt::NoFocus)
|
||||
state.focusable = true;
|
||||
if (w->hasFocus())
|
||||
state.focused = true;
|
||||
if (!w->isEnabled())
|
||||
state.disabled = true;
|
||||
if (w->isWindow()) {
|
||||
if (w->windowFlags() & Qt::WindowSystemMenuHint)
|
||||
state.movable = true;
|
||||
if (w->minimumSize() != w->maximumSize())
|
||||
state.sizeable = true;
|
||||
if (w->isActiveWindow())
|
||||
state.active = true;
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
QAccessibleInterface *QAccessibleTable::childAt(int x, int y) const
|
||||
|
Loading…
x
Reference in New Issue
Block a user