fix(windows): screen-reader accessibility for context menus and channel tree
- ContextMenuStrip: select first item on Opened so keyboard-invoked menus (Shift+F10 / Apps key) raise the UIA focus event immediately instead of staying silent until the first arrow key. - Name the SplitContainer/SplitterPanel containers so screen readers announce orientation instead of a stack of anonymous pane nodes. - Take the resize splitters out of the Tab cycle (TabStop = false) so focus moves control-to-control. - RefreshChannelTree: restore keyboard focus and re-announce the current node after a Nodes.Clear()/rebuild, so the tree no longer loses focus when channels/users change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -140,6 +140,13 @@ partial class MainForm
|
||||
splitLeft.Panel1MinSize = 100;
|
||||
splitLeft.Panel2MinSize = 80;
|
||||
splitLeft.TabIndex = 0;
|
||||
// Keep the resize splitter out of the Tab cycle so focus moves control-to-control.
|
||||
splitLeft.TabStop = false;
|
||||
// Name the otherwise-anonymous "pane" containers so screen readers announce
|
||||
// orientation instead of a stack of unnamed panes.
|
||||
splitLeft.AccessibleName = "Channels and users";
|
||||
splitLeft.Panel1.AccessibleName = "Channels";
|
||||
splitLeft.Panel2.AccessibleName = "Users";
|
||||
splitLeft.Panel1.Controls.Add(tvChannels);
|
||||
splitLeft.Panel1.Controls.Add(lblChannels);
|
||||
splitLeft.Panel2.Controls.Add(lstUsers);
|
||||
@@ -214,6 +221,10 @@ partial class MainForm
|
||||
splitMain.Dock = DockStyle.Fill;
|
||||
splitMain.Panel1MinSize = 150;
|
||||
splitMain.TabIndex = 1;
|
||||
splitMain.TabStop = false;
|
||||
splitMain.AccessibleName = "Main";
|
||||
splitMain.Panel1.AccessibleName = "Channels and users";
|
||||
splitMain.Panel2.AccessibleName = "Chat and activity";
|
||||
splitMain.Panel1.Controls.Add(splitLeft);
|
||||
splitMain.Panel2.Controls.Add(tblRight);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user