Customizable accessible names for the shell menu toggle and the alert close button
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 84/100
- Tipo de issue
- Funcionalidade
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- handlebars, rust
- Domínio
- accessibility, frontend
Direção de pesquisa
Comece em sqlpage/templates/shell.handlebars, nos dois botões de alternância do menu (linhas 174 e 208), e em alert.handlebars, no botão de fechar do alerta dispensável, e copie o padrão {{default …}} que o componente modal já usa para close_label. Adicione as duas linhas de documentação ao lado das propriedades existentes do componente e depois adicione tests/sql_test_files/component_rendering/alert_close_label.sql e shell_navbar_toggle_label.sql, seguindo os testes de renderização existentes. Está concluído quando as novas propriedades alteram o aria-label e as páginas sem elas continuam renderizando os padrões em inglês.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Rust
- Estrelas
- 2.6k
- Forks
- 175
- Merge médio
- 14h 16min
- PRs com merge (30d)
- 43
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de sqlpage/SQLPage
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
sqlpage/SQLPage#1218 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
-
There is no convenient way to reproduce issuesTalvez já em andamento @81reap assumiu há 26 dias. Abertaenhancement
sqlpage/SQLPage#1566 · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Confusing sort interfaceTalvez já em andamento @lovasoa assumiu há 73 dias. Abertabug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 20/100
sqlpage/SQLPage#1442 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
-
Mutation Testing Results :: Dead Code + Missing TestsTalvez livre de novo @81reap assumiu há 61 dias e não há nenhum pull request aberto. Aberta
sqlpage/SQLPage#1396 · 5 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
chart: 3D chartsAbertaenhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
Mantenedores costumam responder em até 1 dia
Todas as issues de sqlpage/SQLPage
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
symposium-dev/symposium#530 ·
Mantenedores costumam responder em até 5 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
topgrade-rs/topgrade#2540 ·
Mantenedores costumam responder em até 1 dia
-
Invalid JSON options for ngram and edge_ngram silently use defaultsTalvez já em andamento @Tilendlesa assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
noemaforge/vimanam#153 ·
Mantenedores costumam responder em até 1 dia