patternfly / patternfly/patternfly-react

Bug - Button - update aria-disabled logic to be more correct

Ouverte
#11,618 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Breaking change :boom: PF Team
Langage dominant
TypeScript
Étoiles
862
Forks
392
Merge moyen
4 j 8 h
PR mergées (30 j)
9

Description

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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par localiser le composant Button en TypeScript et sa couverture de tests d’accessibilité existante. Examinez la manière dont isDisabled, isAriaDisabled, component, disabled et aria-disabled sont gérés, puis vérifiez que aria-disabled n’est rendu que lorsqu’il vaut explicitement true et que les cas documentés où l’élément peut ou ne peut pas recevoir le focus se comportent comme prévu.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
react, typescript
Domaine
accessibility, frontend
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.