Bug - MenuToggle - aria labelling doesn't work as intended
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 65/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Pouca atividade
- Stack de tecnologia
- react, typescript
- Domínio
- accessibility, frontend
Direção de pesquisa
Localize a implementação de MenuToggle, sua interface de props e os exemplos de React Select vinculados na issue. Verifique como aria-label, aria-labelledby e o texto dinâmico do toggle são renderizados atualmente e, em seguida, atualize o componente e os exemplos para que o botão interno tenha o nome acessível necessário. Verifique a marcação resultante com o exemplo single-select e o VoiceOver.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Describe the problem
Per https://github.com/patternfly/patternfly/issues/6562, we need to update how aria labeling is handled in MenuToggle, namely:
-
Right now the aria-label on the MenuToggle does nothing since the text content is taking precedence,
-
We need to ensure MenuToggle's with dynamic text content have an accessible name that includes a static label as well as the dynamic toggle content
How do you reproduce the problem?
Go to a MenuToggle and Select example and navigate both with VoiceOver. Notice that only the text content gets announced. Then choose a new option in the Select example, and notice that there's no context for what the Select is actually for but rather just the current text content.
Expected behavior
Note this is most likely only for a non-typeahead and non-plain MenuToggle, basically only a MenuToggle whose content would be dynamic like in Select examples (where by default the toggle content may be "Choose an option", then choosing an option updates the toggle content to e.g. "Option 1").
-
MenuToggle should have an aria-labelledby on its internal
buttonelement that should reference thepf-v6-c-menu-toggle__button(if aria-label is passed; if aria-labelledby is passed to MenuToggle then this internal aria-labelledby should reference that ID instead) andpf-v6-c-menu-toggle__textelements -- this should only occur when aria-label or aria-labelledby are passed to MenuToggle -
We should add aria-labelledby to the props interface to explicitly expose it
-
Examples using MenuToggle must be updated so that there is a unique/descriptive static label as well as its content label
Using the single select example in React, here's what the markup should end up looking similar to:
Is this issue blocking you?
List the workaround if there is one.
Screenshots
If applicable, add screenshots to help explain the issue.
What is your environment?
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
What is your product and what release date are you targeting?
Any other information?
Jira Issue: PF-1729
- Linguagem predominante
- TypeScript
- Estrelas
- 862
- Forks
- 392
- Merge médio
- 4d 8h
- PRs com merge (30d)
- 9
Preparar o ambiente
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 patternfly/patternfly-react
-
PF Team
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
patternfly/patternfly-react#12651 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
patternfly/patternfly-react#12637 ·
Mantenedores costumam responder em até 1 dia
-
PF Team
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
patternfly/patternfly-react#12617 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
PF Team
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
patternfly/patternfly-react#12610 · 1 comentário · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
patternfly/patternfly-react#12600 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de patternfly/patternfly-react
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
melgarafael/DeskcommCRM#1812 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
prisma/prisma-cli#309 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
gregwebs/pi-quota-dispatcher#26 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
openwatersio/slackwater.xyz#124 ·
Mantenedores costumam responder em até 1 dia
-
agent-reported area/browser area/docs documentation good first issue hacktoberfest help wanted P2
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
Mantenedores costumam responder em até 2 dias