-
Notifications
You must be signed in to change notification settings - Fork 0
🎨 Palette: Add ARIA labels to icon-only buttons #36
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
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| ## 2026-05-15 - Adding aria-label and title to icon-only buttons | ||
| **Learning:** Found several modal and tab files using pure SVG icon buttons with no aria-label or title. These components need an accessible name for screen readers. Using both `aria-label` (for screen readers) and `title` (for mouse hover tooltips) provides a universally better experience. | ||
| **Action:** When adding icon-only buttons in future features, make sure they have localized (e.g. French) aria-label and title attributes. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -438,10 +438,10 @@ export default function OllamaTab() { | |||||
| <button onClick={() => toggleInstance(inst)} class={`text-[10px] font-bold px-3 py-1 rounded-full border transition-colors ${inst.enabled ? 'border-amber-200 text-amber-700 hover:bg-amber-50' : 'border-green-200 text-green-700 hover:bg-green-50'}`}> | ||||||
| {inst.enabled ? 'Désactiver' : 'Activer'} | ||||||
| </button> | ||||||
| <button onClick={() => startEdit(inst)} class="p-2 text-gray-400 hover:text-gray-600 transition-colors"> | ||||||
| <button onClick={() => startEdit(inst)} class="p-2 text-gray-400 hover:text-gray-600 transition-colors" aria-label="Modifier" title="Modifier"> | ||||||
| <svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><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={() => deleteInstance(inst.id)} class="p-2 text-gray-400 hover:text-red-600 transition-colors"> | ||||||
| <button onClick={() => deleteInstance(inst.id)} class="p-2 text-gray-400 hover:text-red-600 transition-colors" aria-label="Supprimer" title="Supprimer"> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comme pour le bouton de modification, l'ajout du nom de l'instance dans l'attribut
Suggested change
|
||||||
| <svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><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> | ||||||
| </div> | ||||||
|
|
||||||
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.
Pour améliorer l'accessibilité dans une liste d'éléments, il est recommandé d'utiliser des étiquettes contextuelles. En incluant le nom de l'instance (
inst.name) dans l'attributaria-label, vous permettez aux utilisateurs de lecteurs d'écran de distinguer les boutons entre eux sans ambiguïté. Il serait également judicieux d'ajouteraria-hidden="true"à la balise<svg>(ligne suivante) pour éviter qu'elle ne soit interprétée inutilement par les technologies d'assistance.