Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing DataGridView's scrollbars shouldn't include their control type in their accessible names #3038

Merged
merged 3 commits into from
Jul 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/System.Windows.Forms/src/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ System.Windows.Forms.ListViewGroup.TitleImageKey.set -> void
~System.Windows.Forms.ListView.GroupImageList.get -> System.Windows.Forms.ImageList
~System.Windows.Forms.ListView.GroupImageList.set -> void
~override System.Windows.Forms.PictureBox.CreateAccessibilityInstance() -> System.Windows.Forms.AccessibleObject
override System.Windows.Forms.HScrollBar.CreateAccessibilityInstance() -> System.Windows.Forms.AccessibleObject!
override System.Windows.Forms.ScrollBar.CreateAccessibilityInstance() -> System.Windows.Forms.AccessibleObject!
override System.Windows.Forms.VScrollBar.CreateAccessibilityInstance() -> System.Windows.Forms.AccessibleObject!
6 changes: 6 additions & 0 deletions src/System.Windows.Forms/src/Resources/SR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -6653,6 +6653,12 @@ Stack trace where the illegal operation occurred was:
<data name="TaskDialogCanUpdateStateOnlyWhenShown" xml:space="preserve">
<value>Can only update the state of a task dialog while it is shown.</value>
</data>
<data name="HScrollBarDefaultAccessibleName" xml:space="preserve">
<value>Horizontal</value>
</data>
<data name="VScrollBarDefaultAccessibleName" xml:space="preserve">
<value>Vertical</value>
</data>
<data name="TaskDialogCollectionAlreadyBound" xml:space="preserve">
<value>One of the collections of this {0} is already bound to a {1} instance.</value>
</data>
Expand Down
10 changes: 10 additions & 0 deletions src/System.Windows.Forms/src/Resources/xlf/SR.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/System.Windows.Forms/src/Resources/xlf/SR.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/System.Windows.Forms/src/Resources/xlf/SR.es.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/System.Windows.Forms/src/Resources/xlf/SR.fr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/System.Windows.Forms/src/Resources/xlf/SR.it.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/System.Windows.Forms/src/Resources/xlf/SR.ja.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/System.Windows.Forms/src/Resources/xlf/SR.ko.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/System.Windows.Forms/src/Resources/xlf/SR.pl.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/System.Windows.Forms/src/Resources/xlf/SR.pt-BR.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/System.Windows.Forms/src/Resources/xlf/SR.ru.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/System.Windows.Forms/src/Resources/xlf/SR.tr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/System.Windows.Forms/src/Resources/xlf/SR.zh-Hans.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/System.Windows.Forms/src/Resources/xlf/SR.zh-Hant.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace System.Windows.Forms
{
public partial class HScrollBar
{
internal class HScrollBarAccessibleObject : ScrollBarAccessibleObject
{
internal HScrollBarAccessibleObject(HScrollBar owner) : base(owner)
{
}

public override string Name
{
get => base.Name ?? SR.HScrollBarDefaultAccessibleName;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace System.Windows.Forms
/// Represents a standard Windows horizontal scroll bar.
/// </summary>
[SRDescription(nameof(SR.DescriptionHScrollBar))]
public class HScrollBar : ScrollBar
public partial class HScrollBar : ScrollBar
{
protected override CreateParams CreateParams
{
Expand All @@ -24,6 +24,10 @@ protected override CreateParams CreateParams
}
}

protected override Size DefaultSize => new Size(80, SystemInformation.HorizontalScrollBarHeight);
protected override Size DefaultSize
=> new Size(80, SystemInformation.HorizontalScrollBarHeight);

protected override AccessibleObject CreateAccessibilityInstance()
=> new HScrollBarAccessibleObject(this);
}
}
Loading