bug: ion-input-otp - inputs are named "Input n of m" only, host ARIA is not forwarded, error text cannot be associated, focus outline removed
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- accessibility, frontend
Direzione di ricerca
Start by locating the ion-input-otp component implementation and its accessibility and focus-style tests; the issue does not name their paths. Read how host ARIA attributes reach the group and how native inputs get their labels, then check the input styling. Done when each input can have an understandable label and associated error state, and keyboard focus has a visible indicator.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v8.x, v9.x
Current Behavior
ion-input-otp renders its native <input> elements with a fixed, English accessible name
("Input 1 of 6" ... "Input 6 of 6"). An aria-label set on the host is forwarded to the group
only, not to the inputs, so a screen reader user never hears what the inputs are for (e.g. "PIN").
An error message rendered next to the component cannot be associated with the inputs: there is
no way to set aria-describedby / aria-errormessage or aria-invalid on the native inputs.
The component also removes the focus outline (outline: none, specificity 0,4,0), so keyboard
focus is visible only through the border colour, and the default border colour is set in a rule
with specificity 0,2,0 that can only be overridden via --ion-color-step-300, not via
--border-color.
Measured with TalkBack (Android 14, Capacitor 8): "Passwort. 1 Zeichen. Input 5 of 6".
Verified on Ionic 9.0.8 and 8.8.5 with identical results (Chrome headless, accessibility tree, after
tabbing into the component): the host aria-label, aria-describedby and aria-invalid move to the
role="group" wrapper (group: name "PIN", description = error text, invalid=true); the native inputs
keep the name "Input 1 of 6" with no description and invalid=false; the focused input has
outline: none, only the border colour changes. A previous attempt to add helperText/errorText
(#30698) was closed without merge.
Expected Behavior
- A way to label the inputs (translated, e.g. "PIN, Ziffer 1 von 6"), for example an
inputLabelfunction or forwardingaria-labelwith the index appended. aria-describedby/aria-invalidforwarded to the native inputs so an error message can be
associated.- A visible focus indicator with at least 3:1 contrast, or a
--focus-outlineCSS variable.
Steps to Reproduce
- Place
<ion-input-otp length="6" aria-label="PIN"></ion-input-otp>and a<p id="err">error
message next to it. - Inspect the accessibility tree: inputs are named "Input 1 of 6" ...;
aria-labelsits on the group. - Try to associate
#errwith the inputs - no API. - Tab into the component: no outline, only the border colour changes.
Code Reproduction URL
https://github.com/mrambow/starterApp/blob/a11y-repros/core-repros/otp.html - single HTML file, no build,
loads @ionic/core from jsDelivr; ?v=8.8.5 switches the version.
Live: https://raw.githack.com/mrambow/starterApp/a11y-repros/core-repros/otp.html
Code Reproduction URL
https://github.com/mrambow/starterApp/blob/a11y-repros/core-repros/otp.html
Ionic Info
@ionic/core 9.0.8 and 8.8.5, plain HTML. Found in: Ionic 8.8.5, Angular 21, Capacitor 8;
Android 14 WebView (TalkBack), iOS 26.
Additional Information
No response
- Lingua principale
- TypeScript
- Stelle
- 52.8k
- Fork
- 13.3k
- Merge medio
- 3g 1h
- PR unite (30g)
- 86
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 ionic-team/ionic-framework
-
bug: input-otp, backspace in an empty box only moves focus instead of clearing the previous boxForse già presa @sarankumar1325 l’ha presa 23 giorni fa. Apertapackage: core type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
ionic-team/ionic-framework#31639 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug: vue swipe cancellation throws when the previous page is missingForse già presa @dandoingdev l’ha presa 46 giorni fa. Apertapackage: vue type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ionic-team/ionic-framework#31514 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug: ion-searchbar input is always labelled "search text"; aria-label on the host is not forwardedForse già presa @HappyKnuckles l’ha presa 41 giorni fa. Apertaa11y package: core type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
ionic-team/ionic-framework#31492 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug: IonTabs throws when a Fragment contains one IonRouterOutletForse già presa @Benziza l’ha presa 82 giorni fa. Apertapackage: react type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ionic-team/ionic-framework#31410 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug: angular swipe-back gesture crashes in StackController.startBackTransition when the stack is popped before the gesture is capturedForse già presa @officialasishkumar l’ha presa 9 giorni fa. Apertapackage: angular type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
ionic-team/ionic-framework#31291 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di ionic-team/ionic-framework
Issue simili
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
lingdojo/kana-dojo#34223 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
bug status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
mastra-ai/mastra#30587 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area:web p2 product:business triage:active type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
cuadrao-ai/argus#2228 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
embedpdf/embed-pdf-viewer#1098 ·
I maintainer di solito rispondono entro 1 giorno
-
.Needs Triage .Team/Metabot Priority:P3 Type:Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
metabase/metabase#87252 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno