patternfly / patternfly/patternfly-react
Bug - Table - hoverable example invalid markup and selection not announced on navigation
Personne n'a encore pris cette issue.
- 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 #7732
The hoverable selectable Table example throws the following warning in the dev environment:
Warning: validateDOMNesting(...): <output> cannot appear as a child of <tbody>
Additionally, due to the way screen readers navigate tables (by cell rather than by row), the row that is selected only gets announced when a row is selected via a cell. Using Tab to navigate between rows (as the table caption instructs) does announce whether the row is selected, but it only announces the aria-label and not the content of the row.
Some possible alternatives:
- Add a hidden input to each row, similar to the implementation seen in Data list selectable rows example. To avoid invalid markup, I believe this might require having an empty column similar to the table examples that use visible radio inputs.
- Add a hidden input to the first cell of a row, and add styling so that when the radio input has focus it looks like the row has focus.
- Move the current
outputelement to the first<td>element of a row
How do you reproduce the problem?
Navigate the Hoverable selectable table example with a screen reader
Expected behavior
Markup is valid, and users can be notified whether the current row is selected as best as possible
Is this issue blocking you?
No
Screenshots
N/A
What is your environment?
N/A
What is your product and what release date are you targeting?
N/A
Any other information?
N/A
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par l’exemple de Table survolable et sélectionnable lié dans l’issue, puis reproduisez l’avertissement et le comportement du lecteur d’écran lors de la navigation avec un lecteur d’écran. Inspectez le balisage de sélection des lignes de l’exemple ; c’est terminé lorsque le tableau possède un balisage valide et annonce si la ligne actuelle est sélectionnée ainsi que son contenu dans la mesure du possible.
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é
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100