Accessibility: improve the accessibility of Mouse preferences for Narrator
Problem: In Mouse preferences, the list of bindings has a dummy empty column, which is a workaround for getting the Tool column to be right aligned. As a result, Narrator reads the list as having 5 columns which is confusing. In addtion, when arrowing down such a list, Narrator initially just reads the contents of the first column, which is unfortunately an empty string. Fix: After all the columns have been inserted, the dummy column can be deleted. This workaround was suggested by some Microsoft documentation.
This commit is contained in:
parent
f83a773ec2
commit
ddda350330
|
@ -48,7 +48,6 @@
|
|||
// The numbers of the columns of the mList.
|
||||
enum
|
||||
{
|
||||
BlankColumn,
|
||||
ToolColumn,
|
||||
ActionColumn,
|
||||
ButtonsColumn,
|
||||
|
@ -106,13 +105,14 @@ void MousePrefs::PopulateOrExchange(ShuttleGui & S)
|
|||
/// Creates the contents of mList
|
||||
void MousePrefs::CreateList()
|
||||
{
|
||||
//An empty first column is a workaround - under Win98 the first column
|
||||
//A dummy first column, which is then deleted, is a workaround - under Windows the first column
|
||||
//can't be right aligned.
|
||||
mList->InsertColumn(BlankColumn, wxT(""), wxLIST_FORMAT_LEFT);
|
||||
mList->InsertColumn(ToolColumn, _("Tool"), wxLIST_FORMAT_RIGHT);
|
||||
mList->InsertColumn(ActionColumn, _("Command Action"), wxLIST_FORMAT_RIGHT);
|
||||
mList->InsertColumn(ButtonsColumn, _("Buttons"), wxLIST_FORMAT_LEFT);
|
||||
mList->InsertColumn(CommentColumn, _("Comments"), wxLIST_FORMAT_LEFT);
|
||||
mList->InsertColumn(0, wxT(""), wxLIST_FORMAT_LEFT);
|
||||
mList->InsertColumn(ToolColumn + 1, _("Tool"), wxLIST_FORMAT_RIGHT);
|
||||
mList->InsertColumn(ActionColumn + 1, _("Command Action"), wxLIST_FORMAT_RIGHT);
|
||||
mList->InsertColumn(ButtonsColumn + 1, _("Buttons"), wxLIST_FORMAT_LEFT);
|
||||
mList->InsertColumn(CommentColumn + 1, _("Comments"), wxLIST_FORMAT_LEFT);
|
||||
mList->DeleteColumn(0);
|
||||
|
||||
AddItem(_("Left-Click"), _("Select"), _("Set Selection Point"));
|
||||
AddItem(_("Left-Drag"), _("Select"), _("Set Selection Range"));
|
||||
|
@ -167,7 +167,6 @@ void MousePrefs::CreateList()
|
|||
AddItem(CTRL + _("-Wheel-Rotate"), _("Any"), _("Zoom waveform in or out"));
|
||||
AddItem(CTRL + _("-Shift-Wheel-Rotate"), _("Any"), _("Vertical Scale Waveform (dB) range"));
|
||||
|
||||
mList->SetColumnWidth(BlankColumn, 0);
|
||||
mList->SetColumnWidth(ToolColumn, wxLIST_AUTOSIZE);
|
||||
mList->SetColumnWidth(ActionColumn, wxLIST_AUTOSIZE);
|
||||
mList->SetColumnWidth(ButtonsColumn, wxLIST_AUTOSIZE);
|
||||
|
@ -184,8 +183,7 @@ void MousePrefs::AddItem(wxString const & buttons, wxString const & tool,
|
|||
wxString const & action, wxString const & comment)
|
||||
{
|
||||
int i = mList->GetItemCount();
|
||||
mList->InsertItem(i, wxT(""));
|
||||
mList->SetItem(i, ToolColumn, tool);
|
||||
mList->InsertItem(i, tool);
|
||||
mList->SetItem(i, ActionColumn, action);
|
||||
mList->SetItem(i, ButtonsColumn, buttons);
|
||||
|
||||
|
|
Loading…
Reference in New Issue