Editor: suggestion menu fails ARIA listbox rules, and toolbar toggles have no `aria-pressed`
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- accessibility, frontend
Línea de trabajo
The suggestion menu markup is in useEditorMenu (the issue cites dist/runtime/composables/useEditorMenu.js; find its source), and the toolbar buttons are built in getButtonProps in EditorToolbar.vue. Start by reproducing with axe on an open "/" menu, then check the listbox, group, label and separator roles and the aria-pressed value for toggle kinds. Done when axe reports no failures for those three rules and toggle buttons expose aria-pressed that matches their active state, with one-shot kinds left unchanged.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Environment
- Operating system: Linux 6.18.44-fc-v378
- CPU: Intel(R) Xeon(R) Processor @ 2.30GHz (4 cores)
- Node.js version: v22.23.4
- nuxt/cli version: 4.0.1
- Package manager: [email protected]
- Nuxt version: 4.6.3
- Nitro version: 2.13.5
- Builder: [email protected]
- Config: app, compatibilityDate, css, devtools, experimental, extends, hooks, icon, modules, nitro, routeRules, runtimeConfig, security, sentry, serverHandlers, sourcemap, ssr, typescript, ui, vite
- Modules: slimAppTypeProgram(), @nuxt/[email protected], [email protected], [email protected], @sentry/nuxt/[email protected]
Is this bug related to Nuxt or Vue?
Nuxt
Package
v4.x
Version
4.12.0
Reproduction
- Render
<UEditor>with<UEditorToolbar>and<UEditorSuggestionMenu>from the docs example. - Type "/" and run axe on the page: the three rules above fail on the menu.
- Select bold text and inspect the Bold button: there is no
aria-pressedattribute.
Description
1. Suggestion menu (useEditorMenu)
Found with axe-core 4.x on an open "/" menu and confirmed with a screen reader.
role="listbox"sits on the outer content element. Its children include the viewport
(role="presentation"), group labels and separators, so the listbox owns elements that are not
options or groups (axearia-required-children).- The listbox has no accessible name (axe
aria-input-field-name). - Separators carry
role="separator"inside the listbox, which is not an allowed child. - Groups have a visible label but no
aria-labelledby, so the group name is not announced. - The scrolling viewport is not focusable, so a keyboard user who cannot use the arrow keys
cannot scroll it (axescrollable-region-focusable).
Suggested change (what we patch locally in dist/runtime/composables/useEditorMenu.js):
- move
role="listbox"to the viewport, give itaria-label(an option, default "Suggestions")
andtabindex="0"; - each group:
role="group"witharia-labelledbypointing at its label'sid; - label:
role="presentation"with thatid; separator:role="presentation"and
aria-hidden="true".
2. Toolbar toggles (EditorToolbar.vue)
Bold, Italic, the lists, Quote and the other toggle kinds show their active state through
active (colour and variant) only. No aria-pressed is set, so a screen reader announces
"Bold, button" whether or not the selection is bold (WCAG 4.1.2 Name, Role, Value).
Suggested change (what we patch locally): in getButtonProps, add
"aria-pressed": isToggle(item) ? isActive(item) : undefined, where isToggle is true for a
button item (no items) whose kind is mark, bulletList, orderedList, taskList,
blockquote, codeBlock, textAlign or heading. One-shot kinds (link, image,
horizontalRule, undo, redo) keep no aria-pressed. A custom handler could opt in through a
toggle: true field on the item instead of a naming rule.
Additional context
No response
Logs
- Lenguaje dominante
- TypeScript
- Estrellas
- 7.1k
- Forks
- 1.2k
- Merge medio
- 1 d 2 h
- PR fusionados (30 d)
- 147
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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 nuxt/ui
-
triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
SelectMenu: expose item for default slotPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertotriage
Dificultad 2/5 1-3 horas Aptitud para principiantes 61/100
Los mantenedores suelen responder en 1 día
-
NavigationMenu: expanding a nested item in vertical orientation collapses its parent when using v-modelPosiblemente ocupada @cristianchiriac la tomó hace 32 días. Abiertotriage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
UAvatar wrong root for passthoughPosiblemente ocupada @lazerg la tomó hace 79 días. Abiertotriage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
Issues similares
-
bug priority: low role: BE stage: now
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
ahmadrosid/nakama#2594 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
milind-soni/OpenMausBot#6495 ·
Los mantenedores suelen responder en 1 día
-
Navigating the session tree adds the branch's prompts to Up-arrow history againPosiblemente ocupada @acmerfight la tomó hoy. Abiertountriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
earendil-works/pi#12279 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
approved documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 89/100
vitest-dev/vitest#12015 · 4 comentarios ·
Los mantenedores suelen responder en 1 día