Skip to content

🎨 Palette: [UX improvement] Enhance accessibility and visual feedback#26

Open
LVT-ENG wants to merge 1 commit intomainfrom
palette-ux-improvements-3411431885991634331
Open

🎨 Palette: [UX improvement] Enhance accessibility and visual feedback#26
LVT-ENG wants to merge 1 commit intomainfrom
palette-ux-improvements-3411431885991634331

Conversation

@LVT-ENG
Copy link
Copy Markdown
Member

@LVT-ENG LVT-ENG commented Mar 23, 2026

💡 What: This PR introduces three micro-UX and accessibility enhancements:

  1. Visual Feedback: Implemented the missing .loader CSS class in styles/main.css. This ensures that the "ASK PAU" button shows a rotating loader during the analysis process, as intended by the JavaScript logic.
  2. Keyboard Accessibility: Updated requestPrivatePass in js/main.js to automatically focus the password input field when the Staff Access modal is opened, saving the user an extra click/tab.
  3. Screen Reader Support: Added an aria-label to the #private-pass-input in index.html to provide clear context for assistive technologies.

🎯 Why: These small changes collectively make the interface feel more responsive and accessible, adhering to high UX standards and ensuring a smoother experience for all users.

📸 Before/After:

  • Before: Clicking "ASK PAU" would disable the button with text but no visual spinner. The Staff Access modal required manual clicking into the input field.
  • After: A gold rotating loader appears next to the executing text. The Staff Access input is focused immediately upon opening.

♿ Accessibility:

  • Added aria-label to the password input.
  • Improved focus management for modal interactions.

PR created automatically by Jules for task 3411431885991634331 started by @LVT-ENG

- Added missing .loader CSS class for form submission feedback.
- Added aria-label to private pass input for screen readers.
- Implemented auto-focus for the private pass modal input.

Co-authored-by: LVT-ENG <214667862+LVT-ENG@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.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
_deploy_build Ready Ready Preview, Comment Mar 23, 2026 6:02am
tryonyou-org Ready Ready Preview, Comment Mar 23, 2026 6:02am

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 application by adding visual feedback, improving keyboard navigation, and providing better support for screen readers. These changes make the interface more responsive and user-friendly.

Highlights

  • Visual Feedback: Implemented the .loader CSS class to display a rotating loader when the 'ASK PAU' button is clicked, providing visual feedback during the analysis process.
  • Keyboard Accessibility: Updated requestPrivatePass in js/main.js to automatically focus the password input field when the Staff Access modal is opened, improving keyboard navigation.
  • Screen Reader Support: Added an aria-label to the #private-pass-input in index.html to provide clear context for assistive technologies.
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.

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.

Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

Code Review

Este PR introduce buenas mejoras de accesibilidad y experiencia de usuario. Mis comentarios se centran en refinar aún más estas mejoras. En index.html, sugiero ajustar el aria-label y el placeholder para mayor claridad y consistencia. En js/main.js, señalo un aspecto importante de la gestión del foco en modales para completar la mejora de accesibilidad: restaurar el foco al elemento original cuando el modal se cierra. Los cambios en el CSS para el loader son correctos.

Comment on lines +228 to +229
const input = document.getElementById('private-pass-input');
if (input) input.focus();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

¡Excelente mejora de accesibilidad al mover el foco al input!

Para completar el patrón de accesibilidad de un modal, es crucial devolver el foco al elemento que lo activó cuando el modal se cierra. De lo contrario, el foco se "pierde" en la página (a menudo vuelve al inicio del <body>), creando una mala experiencia para la navegación por teclado.

Para solucionarlo, puedes guardar el elemento activo antes de mostrar el modal y restaurar el foco al cerrarlo.

1. Añade una propiedad en el constructor:

constructor() {
    // ...
    this.previouslyFocusedElement = null;
    this.init();
}

2. Guarda el foco en requestPrivatePass:

requestPrivatePass() {
    this.previouslyFocusedElement = document.activeElement; // Guardar foco
    const modal = document.getElementById('private-pass-modal');
    modal.style.display = 'flex';
    const input = document.getElementById('private-pass-input');
    if (input) input.focus();
}

3. Restaura el foco en closePrivatePass:

closePrivatePass() {
    const modal = document.getElementById('private-pass-modal');
    modal.style.display = 'none';
    if (this.previouslyFocusedElement) {
        this.previouslyFocusedElement.focus(); // Restaurar foco
    }
}

Esto asegurará una experiencia de usuario fluida y accesible.

<h3 style="color:#C5A46D; margin-bottom:1.5rem;">PASE PRIVADO SOLICITADO</h3>
<p style="color:#F5EFE6; opacity:0.7; margin-bottom:2rem;">Contenido restringido para Curadores del Búnker. Por favor, introduce tu credencial de acceso.</p>
<input type="password" id="private-pass-input" placeholder="Credential ID" style="width:100%; padding:1rem; background:#0d0e10; border:1px solid rgba(255,255,255,0.1); color:#F5EFE6; margin-bottom:2rem;">
<input type="password" id="private-pass-input" placeholder="Credential ID" aria-label="Introduce tu credencial de acceso" style="width:100%; padding:1rem; background:#0d0e10; border:1px solid rgba(255,255,255,0.1); color:#F5EFE6; margin-bottom:2rem;">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Para mejorar la accesibilidad y la consistencia, te sugiero los siguientes cambios:

  1. aria-label conciso: El valor de aria-label es una instrucción completa. Es mejor que sea una etiqueta concisa, como "Credencial de acceso", ya que el párrafo anterior ya da el contexto.
  2. Consistencia de idioma: El placeholder "Credential ID" está en inglés. Sería bueno traducirlo a "ID de Credencial" para que coincida con el resto de la interfaz.

Adicionalmente, considera mover los estilos en línea de este elemento a una clase CSS en styles/main.css para mejorar la mantenibilidad.

Suggested change
<input type="password" id="private-pass-input" placeholder="Credential ID" aria-label="Introduce tu credencial de acceso" style="width:100%; padding:1rem; background:#0d0e10; border:1px solid rgba(255,255,255,0.1); color:#F5EFE6; margin-bottom:2rem;">
<input type="password" id="private-pass-input" placeholder="ID de Credencial" aria-label="Credencial de acceso" style="width:100%; padding:1rem; background:#0d0e10; border:1px solid rgba(255,255,255,0.1); color:#F5EFE6; margin-bottom:2rem;">

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