Bug - MenuToggle - aria labelling doesn't work as intended
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 65/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- react, typescript
- Área
- accessibility, frontend
Línea de trabajo
Localiza la implementación de MenuToggle, su interfaz de props y los ejemplos de React Select enlazados en el issue. Comprueba cómo se renderizan actualmente aria-label, aria-labelledby y el texto dinámico del toggle; después, actualiza el componente y los ejemplos para que el botón interno tenga el nombre accesible requerido. Verifica el marcado resultante con el ejemplo single-select y VoiceOver.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 862
- Forks
- 392
- Merge medio
- 4 d 8 h
- PR fusionados (30 d)
- 9
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de patternfly/patternfly-react
-
PF Team
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
patternfly/patternfly-react#12651 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
patternfly/patternfly-react#12637 ·
-
PF Team
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
patternfly/patternfly-react#12617 · 1 comentario ·
-
PF Team
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
patternfly/patternfly-react#12610 · 1 comentario · 1 reacción ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
patternfly/patternfly-react#12600 ·
Todos los issues de patternfly/patternfly-react
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
bcgov/bc-wallet-mobile#4761 · 1 comentario ·
-
external-issue to-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
area-deployment area-integrations triage:bot-seen
Dificultad 2/5 Medio día Aptitud para principiantes 86/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100