Skip to content

Conversation

@ann0see
Copy link
Member

@ann0see ann0see commented Dec 6, 2025

Co-authored-by: GitHub Copilot

This might contain a lot of low quality code for now.

How it looks like:

image

There is a "Show/Hide accessible controls button" at the top which shows/hides the previous/next buttons + the current server info label.

Short description of changes
Adds forward/backward buttons and label to connect dialog for accessability
Copilot's suggestion to fix: #3559 (together with some tweaking)

CHANGELOG: Accessability: Add buttons and label to go through server list

Context: Fixes an issue?
Yes: #490 (workaround)

Does this change need documentation? What needs to be documented and how?

Yes

Status of this Pull Request

Proof of concept. The code is probably extremely convoluted.

What is missing until this pull request can be merged?

Testing, review and simplification.

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

AUTOBUILD: Please build all targets

@ann0see ann0see added this to the Release 3.12.0 milestone Dec 6, 2025
@ann0see ann0see added this to Tracking Dec 6, 2025
@github-project-automation github-project-automation bot moved this to Triage in Tracking Dec 6, 2025
@ann0see ann0see requested review from pljones and softins December 6, 2025 15:14
@ann0see ann0see moved this from Triage to Waiting on Team in Tracking Dec 6, 2025

#ifdef USE_ACCESSIBLE_SERVER_LIST
// Create simplified accessible navigation panel for screen readers
// Design: One info label + 2 navigation buttons (Previous/Next) + Toggle button
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will add screenshot of macOS version

// Create horizontal layout for navigation buttons (Previous, Next)
QHBoxLayout* navLayout = new QHBoxLayout();

butAccessiblePrevious = new QPushButton ( u8"\u2190 " + tr ( "Previous Server" ), wAccessibleNavPanel );
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unicode magic is not nice.

Copy link
Member Author

@ann0see ann0see Dec 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this does not go to the previous server, but rather to the previous entry - so it could also be a musician.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a minimum, the unicode characters want putting into constants, named so someone reading the code gets some idea of what they represent when rendered.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we even need those characters.

// per default the root shall not be decorated (to save space)
lvwServers->setRootIsDecorated ( false );

#ifdef USE_ACCESSIBLE_SERVER_LIST
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this will be an additional build. Will it be included in the macOS bundle so it all gets signed once in the Apple Store?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, does this need to be a compile time option? Just have the accessibility panel hidden unless turned on in Settings->User Profile->User Interface.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd need to track a change in the setting, though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. I was also not sure if it should or should not be. Best case, it's just a button/checkbox.

}

// Initially show the accessible panel
wAccessibleNavPanel->setVisible ( true );
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the setting, you'd set to false immediate after creating and based on the setting here.


QObject::connect ( &TimerReRequestServList, &QTimer::timeout, this, &CConnectDlg::OnTimerReRequestServList );

#ifdef USE_ACCESSIBLE_SERVER_LIST
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the widget exists (even if not shown), these need not be compile-time.


butAccessiblePrevious = new QPushButton ( u8"\u2190 " + tr ( "Previous Server" ), wAccessibleNavPanel );
butAccessiblePrevious->setObjectName ( "butAccessiblePrevious" );
butAccessiblePrevious->setAccessibleName ( tr ( "Go to previous server" ) );
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, "Previous Button" and "Next Button" would be better for these, I think.

butAccessiblePrevious = new QPushButton ( u8"\u2190 " + tr ( "Previous Server" ), wAccessibleNavPanel );
butAccessiblePrevious->setObjectName ( "butAccessiblePrevious" );
butAccessiblePrevious->setAccessibleName ( tr ( "Go to previous server" ) );
butAccessiblePrevious->setAccessibleDescription ( tr ( "Navigate to the previous server in the list" ) );
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then these can be the more vague but more accurate "Moves to the previous server list entry" and "Moves to the next server list entry"

{
QList<QTreeWidgetItem*> selectedItems = lvwServers->selectedItems();

if ( !selectedItems.isEmpty() && selectedItems.first()->parent() == nullptr )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to comment this to explain it has to handle Server entries and Client entries separately.

}
}

void CConnectDlg::OnAccessiblePreviousClicked()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So these will trigger UpdateAccessibleServerInfo through

QObject::connect ( lvwServers, &QTreeWidget::itemSelectionChanged, this, &CConnectDlg::OnServerListItemSelectionChanged );

Copy link
Collaborator

@pljones pljones Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think they should skip Clients -- it needs to step through all entries in the list, otherwise the list isn't fully accessible.

}

#ifdef USE_ACCESSIBLE_SERVER_LIST
void CConnectDlg::UpdateAccessibleServerInfo()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs tests showing:

  1. Empty filter, Show all musicians off
Image 2. Empty filter, Show all musicians on Image 3. Occupied servers filter on, Show all musicians off Image 3. Occupied servers filter on, Show all musicians on Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting on Team

Development

Successfully merging this pull request may close these issues.

2 participants