Fait dire aux boutons repliables s'ils sont ouverts ou fermés
« aria-expanded="@_ouvert" » ne rend pas « true » ou « false » : Blazor y voit un attribut de présence, comme disabled. Vrai donnait aria-expanded="", faux retirait l'attribut — dans les deux cas, un lecteur d'écran n'apprenait rien, et un bouton replié ne s'annonçait plus comme repliable. Le défaut valait pour les six boutons de l'application. Une fonction nommée remplace le booléen nu, qui se relisait comme correct. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -165,7 +165,7 @@ else if (_bibliographie is { } biblio)
|
||||
<div class="actions-formulaire">
|
||||
<button type="button" class="bouton bouton-discret"
|
||||
@onclick="() => _filtresOuverts = !_filtresOuverts"
|
||||
aria-expanded="@_filtresOuverts">
|
||||
aria-expanded="@Aria.Etat(_filtresOuverts)">
|
||||
Filtrer (@NombreFiltres)
|
||||
</button>
|
||||
|
||||
@@ -302,7 +302,7 @@ else if (_bibliographie is { } biblio)
|
||||
{
|
||||
<button type="button" class="carte-titre oeuvre-titre-bouton"
|
||||
@onclick="() => BasculerOeuvre(oeuvre.Titre)"
|
||||
aria-expanded="@_oeuvresOuvertes.Contains(oeuvre.Titre)">
|
||||
aria-expanded="@Aria.Etat(_oeuvresOuvertes.Contains(oeuvre.Titre))">
|
||||
@oeuvre.Titre
|
||||
</button>
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<h1 class="titre-page">Catalogue</h1>
|
||||
|
||||
<button type="button" class="bouton bouton-discret bouton-compact"
|
||||
aria-expanded="@_filtresOuverts" aria-controls="filtres-catalogue"
|
||||
aria-expanded="@Aria.Etat(_filtresOuverts)" aria-controls="filtres-catalogue"
|
||||
@onclick="() => _filtresOuverts = !_filtresOuverts">
|
||||
Filtrer@(FiltresActifs > 0 ? $" ({FiltresActifs})" : "")
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user