Skip to content

🎨 Palette: Améliorer l'accessibilité des boutons d'action Ollama#77

Open
bobdivx wants to merge 1 commit into
devfrom
palette/a11y-ollama-buttons-7152885285040917665
Open

🎨 Palette: Améliorer l'accessibilité des boutons d'action Ollama#77
bobdivx wants to merge 1 commit into
devfrom
palette/a11y-ollama-buttons-7152885285040917665

Conversation

@bobdivx
Copy link
Copy Markdown
Owner

@bobdivx bobdivx commented May 30, 2026

💡 What: Ajout d'attributs aria-label et aria-hidden ainsi que des anneaux de focus clavier (focus-visible:ring) aux boutons d'action d'instance Ollama (test, activation, modification, suppression).
🎯 Why: Les boutons contenant uniquement des icônes étaient inaccessibles aux lecteurs d'écran (qui lisaient simplement "bouton") et la navigation au clavier manquait d'indicateurs visuels clairs.
📸 Before/After: Les lecteurs d'écran peuvent désormais décrire correctement les actions, et les utilisateurs naviguant au clavier verront un anneau vert (#175B37) autour des boutons ciblés.
Accessibility: Amélioration significative de la prise en charge des lecteurs d'écran et de la navigation au clavier (WCAG).


PR created automatically by Jules for task 7152885285040917665 started by @bobdivx

Co-authored-by: bobdivx <6737167+bobdivx@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 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 May 30, 2026

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

Project Deployment Actions Updated (UTC)
forge Ready Ready Preview, Comment May 30, 2026 5:30pm

Copy link
Copy Markdown

@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

This pull request improves accessibility and keyboard navigation in the OllamaTab component by adding focus rings, aria-label attributes, and hiding decorative SVGs from screen readers. The review feedback suggests a bug fix to correctly handle the loading state of individual model tests by switching from runTest to testModel. Additionally, it recommends adding title attributes to the edit and delete buttons to provide tooltips for desktop users.

Comment on lines 405 to 411
<button
onClick={() => runTest(m, inst.normalizedUrl || inst.url)}
disabled={isTesting || batchTesting}
class={`p-1 rounded hover:bg-gray-200 transition-colors ${isTesting ? 'animate-spin text-blue-500' : 'text-gray-400'}`}
class={`p-1 rounded hover:bg-gray-200 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#175B37] ${isTesting ? 'animate-spin text-blue-500' : 'text-gray-400'}`}
title="Lancer un test"
aria-label="Lancer un test"
>
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

Le bouton de test individuel appelle actuellement runTest, qui ne met pas à jour l'état de chargement local testingModel. Par conséquent, l'icône ne tourne pas (animate-spin) et le bouton n'est pas désactivé pendant un test individuel. En utilisant testModel à la place et en vérifiant si testingModel === m, le bouton affichera correctement l'état de chargement et sera désactivé pour éviter les clics multiples.

Suggested change
<button
onClick={() => runTest(m, inst.normalizedUrl || inst.url)}
disabled={isTesting || batchTesting}
class={`p-1 rounded hover:bg-gray-200 transition-colors ${isTesting ? 'animate-spin text-blue-500' : 'text-gray-400'}`}
class={`p-1 rounded hover:bg-gray-200 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#175B37] ${isTesting ? 'animate-spin text-blue-500' : 'text-gray-400'}`}
title="Lancer un test"
aria-label="Lancer un test"
>
<button
onClick={() => testModel(m, inst.normalizedUrl || inst.url)}
disabled={isTesting || batchTesting || testingModel === m}
class={`p-1 rounded hover:bg-gray-200 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#175B37] ${(isTesting || testingModel === m) ? 'animate-spin text-blue-500' : 'text-gray-400'}`}
title="Lancer un test"
aria-label="Lancer un test"
>

Comment on lines +443 to 445
<button onClick={() => startEdit(inst)} class="p-2 text-gray-400 hover:text-gray-600 transition-colors rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#175B37]" aria-label="Modifier l'instance">
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /></svg>
</button>
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

Pour les utilisateurs sur ordinateur, l'ajout d'un attribut title en plus de aria-label permet d'afficher une infobulle (tooltip) au survol de la souris, ce qui améliore grandement l'expérience utilisateur pour ces boutons contenant uniquement des icônes.

Suggested change
<button onClick={() => startEdit(inst)} class="p-2 text-gray-400 hover:text-gray-600 transition-colors rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#175B37]" aria-label="Modifier l'instance">
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /></svg>
</button>
<button onClick={() => startEdit(inst)} class="p-2 text-gray-400 hover:text-gray-600 transition-colors rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#175B37]" title="Modifier l'instance" aria-label="Modifier l'instance">
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /></svg>
</button>

Comment on lines +446 to 448
<button onClick={() => deleteInstance(inst.id)} class="p-2 text-gray-400 hover:text-red-600 transition-colors rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#175B37]" aria-label="Supprimer l'instance">
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" /></svg>
</button>
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

Pour les utilisateurs sur ordinateur, l'ajout d'un attribut title en plus de aria-label permet d'afficher une infobulle (tooltip) au survol de la souris, ce qui améliore grandement l'expérience utilisateur pour ces boutons contenant uniquement des icônes.

Suggested change
<button onClick={() => deleteInstance(inst.id)} class="p-2 text-gray-400 hover:text-red-600 transition-colors rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#175B37]" aria-label="Supprimer l'instance">
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" /></svg>
</button>
<button onClick={() => deleteInstance(inst.id)} class="p-2 text-gray-400 hover:text-red-600 transition-colors rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#175B37]" title="Supprimer l'instance" aria-label="Supprimer l'instance">
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" /></svg>
</button>

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