Skip to content

Commit 5237d07

Browse files
feat(accessibility): add screen reader support for message list
1 parent 68b4616 commit 5237d07

6 files changed

Lines changed: 1515 additions & 6 deletions

File tree

Telegram/SourceFiles/boxes/language_box.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class Rows : public Ui::RpWidget {
9292
}
9393

9494
Ui::AccessibilityState accessibilityState() const override {
95-
return { .readOnly = true, .focusable = 0 };
95+
return { .readOnly = true };
9696
}
9797

9898
QAccessible::Role accessibilityChildRole() const override {
@@ -396,7 +396,6 @@ void Rows::focusInEvent(QFocusEvent *e) {
396396
if (selected() != index || !hasFocus()) {
397397
return;
398398
}
399-
accessibilityChildStateChanged(index, { .focused = true });
400399
accessibilityChildFocused(index);
401400
});
402401
}

Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3356,7 +3356,6 @@ void InnerWidget::focusInEvent(QFocusEvent *e) {
33563356
if (index < 0) {
33573357
return;
33583358
}
3359-
accessibilityChildStateChanged(index, { .focused = true });
33603359
accessibilityChildFocused(index);
33613360
});
33623361
}
@@ -5769,7 +5768,7 @@ QString InnerWidget::accessibilityName() {
57695768
Ui::AccessibilityState InnerWidget::accessibilityState() const {
57705769
// Mark the List container as non-focusable so screen readers
57715770
// drill down to the focusable child items (ListItem rows).
5772-
return { .focusable = 0 };
5771+
return {};
57735772
}
57745773

57755774
int InnerWidget::accessibilityChildCount() const {

0 commit comments

Comments
 (0)