Customizable accessible names for the shell menu toggle and the alert close button
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 84/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- handlebars, rust
- Ambito
- accessibility, frontend
Direzione di ricerca
Inizia da sqlpage/templates/shell.handlebars nei due pulsanti di attivazione del menu (righe 174 e 208) e da alert.handlebars nel pulsante di chiusura dell'avviso chiudibile, e copia il pattern {{default …}} già usato dal componente modal per close_label. Aggiungi le due righe di documentazione accanto alle proprietà esistenti del componente, quindi aggiungi tests/sql_test_files/component_rendering/alert_close_label.sql e shell_navbar_toggle_label.sql, modellandoli sui test di rendering esistenti. Il lavoro è completo quando le nuove proprietà modificano l'aria-label e le pagine senza di esse continuano a mostrare i valori predefiniti in inglese.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 2.6k
- Fork
- 175
- Merge medio
- 14h 16m
- PR unite (30g)
- 43
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di sqlpage/SQLPage
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
sqlpage/SQLPage#1218 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
There is no convenient way to reproduce issuesForse già presa @81reap l’ha presa 26 giorni fa. Apertaenhancement
sqlpage/SQLPage#1566 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Confusing sort interfaceForse già presa @lovasoa l’ha presa 73 giorni fa. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
sqlpage/SQLPage#1442 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Mutation Testing Results :: Dead Code + Missing TestsForse di nuovo libera @81reap l’ha presa 61 giorni fa e non c’è nessuna pull request aperta. Aperta
sqlpage/SQLPage#1396 · 5 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
chart: 3D chartsApertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di sqlpage/SQLPage
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
symposium-dev/symposium#530 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
topgrade-rs/topgrade#2540 ·
I maintainer di solito rispondono entro 1 giorno
-
Invalid JSON options for ngram and edge_ngram silently use defaultsForse già presa @Tilendlesa l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
noemaforge/vimanam#153 ·
I maintainer di solito rispondono entro 1 giorno