Skip to content

Accessibility: problematic screen reader UX for ContextMenuStrip (NVDA) #3334

@jscholes

Description

@jscholes
  • .NET Core Version: 3.1
  • Have you experienced this same bug with .NET Framework?: No

Problem description:

When using the standard ContextMenu removed in #2157, NVDA announces "Context Menu" when the menu opens. With ContextMenuStrip, NVDA doesn't announce anything on pop-up (not even the presence of a menu without an accessible name), meaning that a user has no idea that a menu has been invoked.

Expected behavior:

NVDA will announce "Context Menu" on pop-up.

Minimal repro:

using System.Drawing;
using System.Windows.Forms;

namespace Test {
	public class MainWindow : Form {
		public MainWindow() {
			this.ClientSize = new Size(800, 450);
			this.Text = "Context Menu Accessibility";
			this.AutoScaleDimensions = new SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.SuspendLayout();
			this.InitializeControls();
			this.ResumeLayout(false);
			this.PerformLayout();
		}

		private void InitializeControls() {
			Button aButton = new Button{
				Text="Button with a ContextMenuStrip"
			};
			ContextMenuStrip ctxMenu = new ContextMenuStrip();
			ctxMenu.Items.Add("Item &1");
			ctxMenu.Items.Add("Item &2");
			ctxMenu.Items.Add("Item &3");
			aButton.ContextMenuStrip = ctxMenu;
			this.Controls.Add(aButton);
		}

		protected override void Dispose(bool disposing) {
			base.Dispose(disposing);
		}
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    tenet-accessibilityMAS violation, UIA issue; problems with accessibility standards

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions