-
Notifications
You must be signed in to change notification settings - Fork 963
feat(site): support icon and description in preset #19063
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
Merged
ssncferreira
merged 12 commits into
main
from
ssncferreira/feat-ui-preset-icon-description
Jul 29, 2025
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
8fea22d
feat: UI create workspace page with preset's icon and description
ssncferreira e1e3d37
fix(site): update Combobox to use ExternalImage instead of Avatar
ssncferreira 9b5e5b7
fix: CreateWorkspacePageView stories
ssncferreira 8a1aa2c
Merge remote-tracking branch 'origin/main' into ssncferreira/feat-ui-…
ssncferreira 477ce03
fix: combobox stories tests
ssncferreira 3256320
chore: minor fixes suggested by Copilot
ssncferreira b3e8854
fix: fix width to w-72 in container instead of Combobox
jaaydenh f95e375
fix: adjust Combobox' Button and PopoverContent width
ssncferreira d895d42
fix: close combobox dropdown when option is selected
ssncferreira da8bab8
Merge branch 'main' into ssncferreira/feat-ui-preset-icon-description
jaaydenh c4444ec
fix: None option with 'undefined' value for correct highlight
ssncferreira a46a698
Merge remote-tracking branch 'origin/main' into ssncferreira/feat-ui-…
ssncferreira File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we changed the icon image to be an ExternalImage with
alt={option.displayName}
https://github.com/coder/coder/pull/19063/files#diff-f7c0d4d4c43b6dd17458ff44a1a0dfdccfae367b09ffe41fdbe09c48c151e466R126The name includes both the image alt text (
Rust
) + the text content (Rust
). Let me know if this is ok, or if there is a better way to filter out this element.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to come in at the last minute (after things have been merged), but these test changes are papering over accessibility problems that the new code introduced. This is especially relevant, as there's a good chance that I'm going to be submitting a VPAT (Voluntary Product Accessibility Template) audit for
coder/coder
sometime in H2 for Marketing/GTMThere's a reason why the testing library changed the accessible name to
"Rust Rust"
– because that's the value that a screen reader will read out to a user who can't see. It's going to be super annoying for the user if they get doubled-up announcements as they cycle through every item in the options listIn my mind, what we can do instead is:
Rust
and justGo
, rather thanRust Rust
andGo Go
)Alt text is only valuable if the content of the image isn't strictly decorative, and actually has semantic meaning that other content in the UI isn't capturing. Because we have the name right next to the image, we don't need the alt text. And or UI programming specifically, you can get away with empty alt text more often than you would think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Parkreiner Thank you for letting me know about this, this is really helpful context 👍
You're right: this PR introduced
alt={option.displayName}
, which led to the repeated accessible name (e.g. "Rust Rust"). I hadn’t realized that would have a direct impact on screen readers, that's super useful to know.I’ll go ahead and:
alt
attribute to use an empty string.Appreciate you taking the time to call this out 🙂