Editor: suggestion menu fails ARIA listbox rules, and toolbar toggles have no `aria-pressed`
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- accessibility, frontend
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 7.1k
- Fork
- 1.2k
- Merge medio
- 1g 2h
- PR unite (30g)
- 147
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nuxt/ui
-
triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
SelectMenu: expose item for default slotForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertatriage
Difficoltà 2/5 1-3 ore Idoneità per principianti 61/100
I maintainer di solito rispondono entro 1 giorno
-
NavigationMenu: expanding a nested item in vertical orientation collapses its parent when using v-modelForse già presa @cristianchiriac l’ha presa 32 giorni fa. Apertatriage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
UAvatar wrong root for passthoughForse già presa @lazerg l’ha presa 79 giorni fa. Apertatriage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Search input loses focus while typing on the Inventory, Reservations and Locations lists (view_configurations enabled)Forse già presa @medusa-os-bot l’ha presa oggi. Apertastatus: needs triaging type: bug version: 2.0
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
medusajs/medusa#17886 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
marimo-team/marimo#11949 ·
I maintainer di solito rispondono entro 1 giorno
-
bug server-time v2
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
modelcontextprotocol/servers#5559 ·
I maintainer di solito rispondono entro 1 giorno
-
D1 Time Travel restore help advertises 30 days without a plan qualifierForse già presa @akhil9tiet l’ha presa oggi. Apertabug package:wrangler product:d1
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
cloudflare/workers-sdk#17000 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno