Skip to content

Commit 27e62d0

Browse files
Set a11y roles for checks, toggles and sliders. (#31600)
1 parent e21a58d commit 27e62d0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

shell/platform/linux/fl_accessible_node.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,13 @@ static AtkRole fl_accessible_node_get_role(AtkObject* accessible) {
176176
if ((self->flags & kFlutterSemanticsFlagIsButton) != 0) {
177177
return ATK_ROLE_PUSH_BUTTON;
178178
}
179+
if ((self->flags & (kFlutterSemanticsFlagHasCheckedState |
180+
kFlutterSemanticsFlagHasToggledState)) != 0) {
181+
return ATK_ROLE_CHECK_BOX;
182+
}
183+
if ((self->flags & kFlutterSemanticsFlagIsSlider) != 0) {
184+
return ATK_ROLE_SLIDER;
185+
}
179186
if ((self->flags & kFlutterSemanticsFlagIsTextField) != 0) {
180187
return ATK_ROLE_TEXT;
181188
}

0 commit comments

Comments
 (0)