Customizable accessible names for the shell menu toggle and the alert close button
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 84/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- handlebars, rust
- Bereich
- accessibility, frontend
Rechercherichtung
Beginne in sqlpage/templates/shell.handlebars bei den beiden Menü-Umschaltknöpfen (Zeilen 174 und 208) und in alert.handlebars beim schließbaren Schaltknopf zum Schließen, und kopiere das bereits von der Komponente modal für close_label verwendete Muster {{default …}}. Füge die beiden Dokumentationszeilen neben den bestehenden Komponenteneigenschaften hinzu und ergänze dann tests/sql_test_files/component_rendering/alert_close_label.sql und shell_navbar_toggle_label.sql nach dem Vorbild der bestehenden Rendering-Tests. Fertig ist, wenn die neuen Eigenschaften das aria-label ändern und Seiten ohne sie weiterhin die englischen Standardtexte rendern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
What we are building:
Public-sector web applications in German that have to meet WCAG 2.1 AA (the same applications as in #1612 and #1615).
Our problem:
A few accessible names are still hard-coded in English and have no property, so screen readers announce English words on an otherwise German page:
| Component | Element | Fixed accessible name |
|---|---|---|
shell |
menu toggle button on small screens (shell.handlebars, lines 174 and 208) |
"Toggle navigation" |
alert |
close button of a dismissible alert (since #1614) | "Close" |
Visible texts of these components can already be customized (for example search_placeholder and search_button since #893, link_text on the alert), and the modal component has close_label for its close button. These two names were left out.
What are you currently doing?
We replace the aria-label attributes with JavaScript after the page loads. That works, but it depends on the markup of the templates and has to be re-checked after every SQLPage update.
Describe the solution you'd like
Two optional properties, with the current English text as default:
shell:navbar_toggle_label, used for both menu toggle buttons;alert:close_label, the same name as on themodalcomponent.
select 'shell' as component, 'Demo' as title, 'about' as menu_item,
'Menü öffnen oder schließen' as navbar_toggle_label;
select 'alert' as component, 'Gespeichert' as title, TRUE as dismissible,
'Schließen' as close_label;
The change is one {{default …}} per attribute, plus two documentation rows. I tried it locally by overriding both templates on v0.48.0: the accessibility tree in Chromium then shows button "Menü öffnen oder schließen" and button "Schließen", and pages without the new properties render exactly as before.
Describe alternatives you've considered
- Built-in translations selected by the
languageproperty of the shell. That would need translation tables inside SQLPage; properties fit better with how #893 handled the other hard-coded strings. - Overriding the templates in
sqlpage/templates/. That works, but then we have to merge every later change toshell.handlebarsandalert.handlebarsby hand.
Additional context
There are a few more fixed English texts that could follow the same pattern later, if wanted: the close button of the toast component ("Close notification"), and the title tooltips "Edit", "Delete" and "View" of the action icons in table and list. I left them out to keep this request small.
If wanted, I can provide a pull request with both properties, their documentation, a CHANGELOG entry and two rendering tests in tests/sql_test_files/component_rendering/ (alert_close_label.sql, shell_navbar_toggle_label.sql), which fail on v0.48.0 and pass with the change.
- Vorherrschende Sprache
- Rust
- Sterne
- 2.6k
- Forks
- 175
- Ø Merge
- 14 Std. 16 Min.
- Gemergte PRs (30 T.)
- 43
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus sqlpage/SQLPage
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
sqlpage/SQLPage#1218 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
There is no convenient way to reproduce issuesEvtl. vergeben @81reap hat das vor 26 Tagen übernommen. Offenenhancement
sqlpage/SQLPage#1566 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Confusing sort interfaceEvtl. vergeben @lovasoa hat das vor 74 Tagen übernommen. Offenbug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 20/100
sqlpage/SQLPage#1442 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Mutation Testing Results :: Dead Code + Missing TestsEvtl. wieder frei @81reap hat das vor 61 Tagen übernommen, und es ist kein Pull Request offen. Offen
sqlpage/SQLPage#1396 · 5 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
chart: 3D chartsOffenenhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in sqlpage/SQLPage
Ähnliche Issues
-
CI/CD ignore-for-release
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
eclipse-ankaios/ankaios#844 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
std: `SliceIndex<str>` missing for `std::ops` ranges, so generic `R: SliceIndex<str>` bounds failOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
symposium-dev/symposium#530 ·
Maintainer antworten meist innerhalb von 5 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag