diff options
author | iain holmes <iain@xamarin.com> | 2017-05-05 14:38:17 +0300 |
---|---|---|
committer | iain holmes <iain@xamarin.com> | 2017-05-15 13:17:41 +0300 |
commit | 24f6b2f64aa391cae29f656b867ebc3a981e62db (patch) | |
tree | c7dd1cdfbdd2b42d67e77d4f77f2afdec3b381d5 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels | |
parent | 6fcac94d6ee2424be5f61a36936a005447b5edd3 (diff) |
[A11y] Make the project options panels accessible
Adds label and help to most of the project options panels in the main repo. Panels using Xwt can't be
made accessible yet. Partially fixes #53537
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/TextStylePolicyPanel.cs | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/TextStylePolicyPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/TextStylePolicyPanel.cs index d6bd13b7d2..db3bd63674 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/TextStylePolicyPanel.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/TextStylePolicyPanel.cs @@ -26,6 +26,7 @@ using System; using MonoDevelop.Components; +using MonoDevelop.Components.AtkCocoaHelper; using MonoDevelop.Core; using MonoDevelop.Projects.Policies; using MonoDevelop.Ide.Projects; @@ -71,8 +72,39 @@ namespace MonoDevelop.Ide.Gui.OptionPanels lineEndingCombo.AppendText (GettextCatalog.GetString ("Mac Classic")); lineEndingCombo.AppendText (GettextCatalog.GetString ("Unix / Mac")); lineEndingCombo.AppendText (GettextCatalog.GetString ("Microsoft Windows")); // Using "Windows" is too short, otherwise the translation get's confused. Mike + + SetupAccessibility (); + } + + void SetupAccessibility () + { + columnWidthSpin.SetCommonAccessibilityAttributes ("Textpolicy.WidthSpinner", + GettextCatalog.GetString ("Desired File Width"), + GettextCatalog.GetString ("The desired width of the file in columns")); + columnWidthSpin.SetAccessibilityLabelRelationship (label1); + + lineEndingCombo.SetCommonAccessibilityAttributes ("Textpolicy.LineEndings", + GettextCatalog.GetString ("Line Endings"), + GettextCatalog.GetString ("Select the type of line endings the file should have")); + lineEndingCombo.SetAccessibilityLabelRelationship (label6); + + tabWidthSpin.SetCommonAccessibilityAttributes ("Textpolicy.TabWidth", + GettextCatalog.GetString ("Tab Width"), + GettextCatalog.GetString ("Select the width of tab stops")); + tabWidthSpin.SetAccessibilityLabelRelationship (label7); + + indentWidthSpin.SetCommonAccessibilityAttributes ("Textpolicy.IndentWidth", + GettextCatalog.GetString ("Indent Width"), + GettextCatalog.GetString ("Select the width of indents")); + indentWidthSpin.SetAccessibilityLabelRelationship (label9); + + tabsToSpaceCheck.SetCommonAccessibilityAttributes ("Textpolicy.TabsToSpaces", null, + GettextCatalog.GetString ("Check to automatically convert tabs to spaces")); + tabsAfterNonTabsCheck.SetCommonAccessibilityAttributes ("Textpolicy.TabsAfterSpaces", null, + GettextCatalog.GetString ("Check to allow tabs after non-tabs")); + removeTrailingWhitespaceCheck.SetCommonAccessibilityAttributes ("Textpolicy.TrailingWhitespace", null, + GettextCatalog.GetString ("Check to automatically remove trailing whitespace from a line")); } - protected virtual void UpdateState (object sender, System.EventArgs e) { panel.UpdateSelectedNamedPolicy (); |