patternfly / patternfly/patternfly-react

Bug - Table - several variants don't allow customizing aria labeling

Abierto
#8,964 12 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

A11y Stale
Lenguaje dominante
TypeScript
Estrellas
862
Forks
392
Merge medio
4 d 8 h
PR fusionados (30 d)
9

Descripción

[Edited by @thatblindgeye 11/7/2025]

This issue should involve fixing the following (we should try to prioritize the first 2 items, as they are affecting the new Compass demos):

  • The action buttons in the ActionsColumn should allow customizing the aria-label and aria-labelledby on MenuToggle, rather than hardcoding them as "Kebab toggle"

  • For selectable with checkbox/radio, we need to allow customizing the aria-label and aria-labelledby for the inputs, and also update the default values to be index + 1 (currently the first row will read "Select row 0", which makes sense from an index persepective but from a user perspective it should probably be "Select row 1")

  • The Table sort functionality should allow passing some SR text to help identify what order the column is sorted.

    • If we have any implementations where a sort button is standalone without any text, we should allow passing an aria-label and aria-labelledby to those as well
  • The Favorite button in FavoritesCell should allow customizing the aria-label and aria-labelledby (props are being spread in this file, but would need to check if how it's actually used with decorators if it's possible to override the default hardcoded values and pass in aria-labelledby)

  • DraggableCell default value should omit the word "button" in its default aria-label at the very least. Ideally we either wouldn't have a default value or the default would be able to be more unique as its used (right now every row will default to the same exact label which isn't good)

    • We should also check if it's actually possible to override the default labels, and add the ability to use aria-labelledby

After these are completed, we want to open followup issues/PRs in Org to update any new Compass demos using a Table with any of the above functionality

[Original ticket below]

Describe the problem
It's not possible to add aria-label in Table sorts, so I can't use semantic syntax. If I'm a user who needs a screen reader to sort some data by name, for example, I just listen "name button" and not something with a better description.

Expected behavior
If I'm a user who needs a screen reader, when clicking in a button I should listen to a descriptive message about the functionality of the button, for accessibility purpose. So, when I have data inside a Table and I want to sort that data, I need to listen to a clear message.

Is this issue blocking you?
No

What is your environment?

  • RHEL 8.6
  • Browser Chrome

What is your product and what release date are you targeting?
consoledot


Jira Issue: PF-136

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Empieza por el componente Table y sus variantes ActionsColumn, selectable checkbox/radio inputs, sort controls, FavoritesCell y DraggableCell indicadas en el issue. Revisa cómo se establecen actualmente sus aria labels y verifica cada requisito de personalización y valor predeterminado enumerado, incluidos los casos de sort y standalone-button. Se considera terminado cuando las variantes de Table afectadas admiten el etiquetado accesible solicitado y están listas para las actualizaciones posteriores de la demo de Compass.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
react, typescript
Área
accessibility, frontend
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.