patternfly / patternfly/patternfly-react

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

Offen
#8,964 12 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

A11y Stale
Vorherrschende Sprache
TypeScript
Sterne
862
Forks
392
Ø Merge
4 T. 8 Std.
Gemergte PRs (30 T.)
9

Beschreibung

[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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne bei der Table-Komponente und ihren im Issue genannten Varianten ActionsColumn, selectable checkbox/radio inputs, sort controls, FavoritesCell und DraggableCell. Überprüfe, wie ihre aktuellen aria labels gesetzt werden, und verifiziere jede aufgeführte Anforderung an Anpassungen und Standardwerte, einschließlich der sort- und standalone-button-Fälle. Fertig bedeutet, dass die betroffenen Table-Varianten die angeforderte barrierefreie Beschriftung unterstützen und für nachfolgende Compass-Demo-Updates bereit sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
react, typescript
Bereich
accessibility, frontend
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.