Bug - Button - update aria-disabled logic to be more correct
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- react, typescript
- Domínio
- accessibility, frontend
Direção de pesquisa
Comece localizando o componente Button em TypeScript e a cobertura existente de testes de acessibilidade. Revise como isDisabled, isAriaDisabled, component, disabled e aria-disabled são tratados e, em seguida, verifique se aria-disabled é renderizado somente quando definido explicitamente como true e se os casos documentados de elementos focáveis e não focáveis se comportam conforme o esperado.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Describe the problem
Followup to https://github.com/patternfly/patternfly-react/issues/11617 for breaking change release. We should update the logic of aria-disabled being applied. Currently aria-disabled is always set and is setup to basically match the disabled value (otherwise we end up with aria-disabled being false when disabled is true, which is contradictory and has potential to cause issue with AT – FWIW in limited testing it seems like disabled has priority, but should still be considered an issue).
Additionally, we were mixing the way to disable the Button depending on the component prop in https://github.com/patternfly/patternfly-react/pull/11478. Instead we should be more explicit that isDisabled should be used when a) the component is button, or b) the button doesn't need to be focusable for a tooltip or similar, and isAriaDisabled should be used when a) the component is anything other than button, or b) when the button is intended to be focusable/hoverable to trigger a Tooltip or similar.
Expected behavior
aria-disabled only renders when true, which matches how the disabled attribute gets rendered (only when true, not rendered when false), and aria-disabled must be set explicitly (rather than having isDisabled set it when component !== button).
Jira Issue: PF-2208
- Linguagem predominante
- TypeScript
- Estrelas
- 862
- Forks
- 392
- Merge médio
- 4d 8h
- PRs com merge (30d)
- 9
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 patternfly/patternfly-react
-
PF Team
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
patternfly/patternfly-react#12651 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
patternfly/patternfly-react#12637 ·
-
PF Team
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
patternfly/patternfly-react#12617 · 1 comentário ·
-
PF Team
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
patternfly/patternfly-react#12610 · 1 comentário · 1 reação ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
patternfly/patternfly-react#12600 ·
Todas as issues de patternfly/patternfly-react
Issues semelhantes
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
-
Crush Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
ElementsProject/cln-application#167 · 1 comentário · 1 reação ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Quantco/pnpm-licenses#17 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100