Bug - MenuToggle - aria labelling doesn't work as intended
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 65/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- react, typescript
- Bereich
- accessibility, frontend
Rechercherichtung
Lokalisieren Sie die MenuToggle-Implementierung, ihre Props-Schnittstelle und die im Issue verknüpften React Select-Beispiele. Prüfen Sie, wie aria-label, aria-labelledby und der dynamische Toggle-Text derzeit gerendert werden, und aktualisieren Sie anschließend die Komponente und die Beispiele, sodass der interne Button den erforderlichen barrierefreien Namen hat. Überprüfen Sie das resultierende Markup anhand des single-select-Beispiels und mit VoiceOver.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Describe the problem
Per https://github.com/patternfly/patternfly/issues/6562, we need to update how aria labeling is handled in MenuToggle, namely:
-
Right now the aria-label on the MenuToggle does nothing since the text content is taking precedence,
-
We need to ensure MenuToggle's with dynamic text content have an accessible name that includes a static label as well as the dynamic toggle content
How do you reproduce the problem?
Go to a MenuToggle and Select example and navigate both with VoiceOver. Notice that only the text content gets announced. Then choose a new option in the Select example, and notice that there's no context for what the Select is actually for but rather just the current text content.
Expected behavior
Note this is most likely only for a non-typeahead and non-plain MenuToggle, basically only a MenuToggle whose content would be dynamic like in Select examples (where by default the toggle content may be "Choose an option", then choosing an option updates the toggle content to e.g. "Option 1").
-
MenuToggle should have an aria-labelledby on its internal
buttonelement that should reference thepf-v6-c-menu-toggle__button(if aria-label is passed; if aria-labelledby is passed to MenuToggle then this internal aria-labelledby should reference that ID instead) andpf-v6-c-menu-toggle__textelements -- this should only occur when aria-label or aria-labelledby are passed to MenuToggle -
We should add aria-labelledby to the props interface to explicitly expose it
-
Examples using MenuToggle must be updated so that there is a unique/descriptive static label as well as its content label
Using the single select example in React, here's what the markup should end up looking similar to:
Is this issue blocking you?
List the workaround if there is one.
Screenshots
If applicable, add screenshots to help explain the issue.
What is your environment?
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
What is your product and what release date are you targeting?
Any other information?
Jira Issue: PF-1729
- Vorherrschende Sprache
- TypeScript
- Sterne
- 862
- Forks
- 392
- Ø Merge
- 4 T. 8 Std.
- Gemergte PRs (30 T.)
- 9
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus patternfly/patternfly-react
-
PF Team
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
patternfly/patternfly-react#12651 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
patternfly/patternfly-react#12637 ·
-
PF Team
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
patternfly/patternfly-react#12617 · 1 Kommentar ·
-
PF Team
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
patternfly/patternfly-react#12610 · 1 Kommentar · 1 Reaktion ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
patternfly/patternfly-react#12600 ·
Alle Issues in patternfly/patternfly-react
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
bcgov/bc-wallet-mobile#4761 · 1 Kommentar ·
-
external-issue to-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
area-deployment area-integrations triage:bot-seen
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 86/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
refactor
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100