Skip to content

Conversation

ashton22305
Copy link
Contributor

Fixes #2694

The Open in terminal button itself was already able to be read by a screen reader, but the dropdown to select each cluster was not very specific. So, it is labeled with the text in the Open in terminal button.

%>
<% if Configuration.login_clusters.count > 0 %>
<button type="button" class="btn btn-sm btn-outline-dark dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button>
<button type="button" class="btn btn-sm btn-outline-dark dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-labelledby="files-shell-button"></button>
Copy link
Contributor

Choose a reason for hiding this comment

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

While aria- attributes are available, the general rule is to try not to use them. Or use them as a last resort.

Thinking in this way - I wonder if we shouldn't just internationalize Open in Terminal and use it here and above (I suppose using here as the title?).

Also - should we do aria-labelledby, let's try to prefer _ separator instead just because that's how rails tends to build form IDs, so it's a uniformity thing with Rails.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

While that's usually true for aria- attributes, the title attribute has its own issues and aria-label or aria-labelledby are more consistent - see https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions/#cardinalrulesofnaming

Copy link
Contributor

@Bubballoo3 Bubballoo3 Sep 25, 2025

Choose a reason for hiding this comment

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

I think a bigger issue is that the tiny side button doesn't do the same thing as "Open in Terminal", it opens a cluster dropdown. Based on my read of the linked guide, aria-label seems to be the best choice here, maybe with text like "Select Cluster". We could also add more description to the dropdown items, like "Open in #{cluster} cluster".

The reason I see aria-label as the best option is that the main drawback is it overrides text contained by that element, but trying this out I just hear "Menu button collapsed sub-menu" when the dropdown button is focused, so there is no contained content that we have to be worried about skipping.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yea I'm fine with aria-label, though I think we should still internationalize this.

@Bubballoo3 Bubballoo3 moved this from Awaiting Review to Changes Requested in PR Review Pipeline Sep 30, 2025
@johrstrom johrstrom closed this Sep 30, 2025
@johrstrom johrstrom reopened this Sep 30, 2025
@github-project-automation github-project-automation bot moved this from Changes Requested to Merged/Closed in PR Review Pipeline Sep 30, 2025
@ashton22305
Copy link
Contributor Author

When testing this out, I noticed that the screen reader repeats "Activate to sort column ascending" when focused on any file or folder in the files view. Should this be fixed here or in its own separate issue?

@ashton22305 ashton22305 added the status/awaiting review Changes made by dev, waiting for reviewers label Oct 2, 2025
@Bubballoo3
Copy link
Contributor

I would make a separate issue for that, just because it deals with the files table instead of the open in terminal button

Copy link
Contributor

@Bubballoo3 Bubballoo3 left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/dashboard status/awaiting review Changes made by dev, waiting for reviewers
Projects
Status: Merged/Closed
Development

Successfully merging this pull request may close these issues.

open in terminal button not accessible
4 participants