Skip to content

🎨 Palette: Improve Create Song Dialog UX and Accessibility#37

Open
imLeGEnDco55 wants to merge 1 commit into
mainfrom
palette/create-song-dialog-ux-14973417009128847106
Open

🎨 Palette: Improve Create Song Dialog UX and Accessibility#37
imLeGEnDco55 wants to merge 1 commit into
mainfrom
palette/create-song-dialog-ux-14973417009128847106

Conversation

@imLeGEnDco55

@imLeGEnDco55 imLeGEnDco55 commented Feb 25, 2026

Copy link
Copy Markdown
Owner

💡 What: Added a clear button to the file input in the Create Song Dialog and added aria-labels to icon-only buttons in the Song Editor.
🎯 Why: Users could not easily remove a selected file in the Create Song Dialog without closing it. Icon-only buttons were inaccessible to screen readers.
📸 Before/After: The file input now shows the filename with an 'X' button to clear it.
♿ Accessibility: Added aria-label to Back, More Options, and Title inputs. Ensured hidden file input is properly labeled.


PR created automatically by Jules for task 14973417009128847106 started by @imLeGEnDco55


Open with Devin

- Add clear button to file input in CreateSongDialog
- Add aria-labels to SongEditor buttons and inputs
- Improve accessibility of hidden file input with htmlFor/id association
- Add test for CreateSongDialog clear functionality

Co-authored-by: imLeGEnDco55 <210333019+imLeGEnDco55@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @imLeGEnDco55, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the user experience and accessibility of the Create Song Dialog and Song Editor components. It introduces a clear button for the file input in the Create Song Dialog, resolving the issue of users being unable to easily remove a selected file. Additionally, it improves accessibility by adding aria-label attributes to icon-only buttons and the Title input in the Song Editor, making the application more usable for individuals relying on screen readers.

Highlights

  • Clear Button for File Input: Implemented a clear button ('X') for the file input in the Create Song Dialog, allowing users to easily remove a selected file.
  • Accessibility Improvements: Added aria-label attributes to icon-only buttons (Back, More Options) and the Title input in the Song Editor to improve accessibility for screen readers.
  • Accessibility Association: Ensured the hidden file input in the Create Song Dialog is properly labeled by associating the label with the input via htmlFor and id.
Changelog
  • CreateSongDialog
    • Added a clear button to remove selected audio files.
    • Improved accessibility by correctly labeling the hidden file input.
  • SongEditor
    • Added aria-labels to Back and More Options buttons for better screen reader support.
    • Added aria-label to the Title input field.
Activity
  • imLeGEnDco55 created the pull request.
  • Changes include adding a clear button to the file input in the Create Song Dialog.
  • Accessibility improvements were made by adding aria-labels to icon-only buttons in the Song Editor.
  • The hidden file input is now properly labeled for accessibility.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 4 additional findings in Devin Review.

Open in Devin Review

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 File input value not reset on submit/close, preventing re-selection of same file

When the dialog is submitted via handleSubmit or closed via handleClose, setAudioFile(null) is called but fileInputRef.current.value is never reset to ''. The new handleClearFile at line 32-37 correctly resets both, establishing the pattern, but handleSubmit and handleClose omit the file input reset.

Detailed Explanation & Impact

After a user selects a file (e.g., song.mp3), submits the form, and then reopens the dialog to create another song:

  1. The audioFile state is null (correctly reset), so the "Seleccionar archivo de audio" button is shown.
  2. The user clicks the button and selects the same song.mp3 file.
  3. The browser's <input type="file"> does NOT fire onChange because its .value still holds the previous filename.
  4. The file appears to not be selected — the user sees no feedback.

The same issue occurs when the dialog is closed via handleClose (line 60-64). The handleClearFile function (line 32-37) correctly resets fileInputRef.current.value = '', but this pattern was not applied to handleSubmit (line 50-51) or handleClose (line 61-62).

Impact: Users cannot re-select the same audio file across consecutive dialog sessions without first selecting a different file.

(Refers to lines 49-52)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request enhances the user experience and accessibility of the CreateSongDialog and SongEditor components. The addition of a clear button for the file input is a great UX improvement, and the new aria-label attributes on various elements significantly improve accessibility. The implementation is solid, and I have one suggestion for CreateSongDialog.tsx to refactor the file reset logic for better robustness and reusability, which will address a potential edge-case bug.

Comment on lines +32 to +38
const handleClearFile = (e: React.MouseEvent) => {
e.stopPropagation();
setAudioFile(null);
if (fileInputRef.current) {
fileInputRef.current.value = '';
}
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To improve code reusability and ensure consistent state management, it's a good practice to extract the logic for resetting the audio file into a dedicated function. This function can then be used here in handleClearFile, and also in other places like handleClose and handleSubmit where the form is reset. This will prevent a subtle bug where re-selecting the same file after closing/submitting the dialog doesn't work because the underlying file input's value hasn't been cleared.

  const resetAudioFile = () => {
    setAudioFile(null);
    if (fileInputRef.current) {
      fileInputRef.current.value = '';
    }
  };

  const handleClearFile = (e: React.MouseEvent) => {
    e.stopPropagation();
    resetAudioFile();
  };

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant