Skip to content

Commit

Permalink
本文入力欄のAccessibleDescriptionに残り文字数のテキストを追加
Browse files Browse the repository at this point in the history
以前のバージョンではタブオーダーが lblLen の次に StatusText が来る順序となっていたが、
25f0899 の修正以降はこれが表示上の順序通りとなるように変更されていた。
しかし、その修正により StatusText にフォーカスを移した際にスクリーンリーダーで
残り文字数が読み上げられなくなり、かえって不便な状態となっていた。
このコミットではタブオーダーを元に戻すのではなく、StatusText の AccessibleText に
残り文字数に関するテキストを含めることでフォーカス時に読み上げられる状態にした。

Fixes: 25f0899 ("TweenMain内の各コントロールのAccessibleNameに適切な名前をセット")
  • Loading branch information
upsilon committed Jun 22, 2016
1 parent b00750a commit 60011d9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
9 changes: 9 additions & 0 deletions OpenTween/Properties/Resources.Designer.cs

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

3 changes: 3 additions & 0 deletions OpenTween/Properties/Resources.en.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1140,4 +1140,7 @@ Available service: {1}</value>
<data name="QuoteStatus_AccessibleText" xml:space="preserve">
<value>[Quote @{0}: {1}]</value>
</data>
<data name="StatusText_AccessibleDescription" xml:space="preserve">
<value>{0} characters remaining</value>
</data>
</root>
3 changes: 3 additions & 0 deletions OpenTween/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1198,4 +1198,7 @@
<data name="QuoteStatus_AccessibleText" xml:space="preserve">
<value>[引用 @{0}: {1}]</value>
</data>
<data name="StatusText_AccessibleDescription" xml:space="preserve">
<value>残り{0}文字</value>
</data>
</root>
3 changes: 3 additions & 0 deletions OpenTween/Tween.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4699,6 +4699,9 @@ private void StatusText_TextChanged(object sender, EventArgs e)
{
StatusText.ForeColor = _clInputFont;
}

this.StatusText.AccessibleDescription = string.Format(Properties.Resources.StatusText_AccessibleDescription, pLen);

if (string.IsNullOrEmpty(StatusText.Text))
{
this.inReplyTo = null;
Expand Down
2 changes: 1 addition & 1 deletion OpenTween/Tween.resx
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@
<data name="&gt;&gt;PostButton.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="lblLen.AccessibleName" xml:space="preserve">
<data name="lblLen.AccessibleDescription" xml:space="preserve">
<value>残り文字数</value>
</data>
<data name="lblLen.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
Expand Down

0 comments on commit 60011d9

Please sign in to comment.