GUI: Add accessibility region role for landmark navigation
Adds ROLE_REGION to allow controls to be marked as accessibility regions/landmarks. - Add `accessibility_region` property to Control - Add ROLE_REGION to DisplayServer and AccessKit mapping - Prevent Container/ScrollContainer from overriding region role - Fix TabContainer to update accessibility when tabs change - Mark editor docks, main screen, bottom panel, and scene tabs as regions
This commit is contained in:
parent
5f9a510441
commit
d53ab67b83
13 changed files with 57 additions and 2 deletions
|
|
@ -43,6 +43,15 @@ void EditorDock::_emit_changed() {
|
|||
emit_signal(SNAME("_tab_style_changed"));
|
||||
}
|
||||
|
||||
void EditorDock::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_READY: {
|
||||
set_accessibility_region(true);
|
||||
set_accessibility_name(get_display_title());
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
void EditorDock::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("open"), &EditorDock::open);
|
||||
ClassDB::bind_method(D_METHOD("make_visible"), &EditorDock::make_visible);
|
||||
|
|
@ -142,6 +151,7 @@ void EditorDock::set_title(const String &p_title) {
|
|||
return;
|
||||
}
|
||||
title = p_title;
|
||||
set_accessibility_name(get_display_title());
|
||||
_emit_changed();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue