bug: aria-expanded is ignored when used in ion-item (TalkBack)

Ouverte
#30,558 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
45/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
angular, typescript

Piste de recherche

Commencez par les exemples reproduits de ion-item et div dans app.component.ts et app.component.html du projet StackBlitz lié. Exécutez la reproduction sur Android avec TalkBack activé et comparez la manière dont aria-expanded est exposé pour chaque élément. C’est terminé lorsque ion-item amène TalkBack à annoncer l’état développé ou réduit de manière cohérente avec l’exemple div.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

a11y type: bug
Prerequisites
Ionic Framework Version

v8.x

Current Behavior

In our app we have some cases where we display some collapsible information without using ion-accordion, we implement the collapse/expand ourselves. The "expand" action is done clicking an ion-item, so we added aria-expanded to it. But Google Talkback is ignoring the aria-expanded attribute (I haven't tested it with VoiceOver yet).

The same implementation using a div works fine.

Expected Behavior

Talkback should be able to detect aria-expanded, so it should read "expanded" or "collapsed".

Steps to Reproduce
  1. Open this URL in an Android device (e.g. in Chrome): https://stackblitz.com/edit/prza28ny-qihwpnvt?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.component.html
  2. Open the "Preview" panel and wait for the project to run.
  3. Enable Talkback.
  4. Select the "Content title" below "Using ion-item". Talkback will only read "Content title", it doesn't read the aria-expanded.
  5. Now select the "Content title" below "Using div". Talkback will now read "Collapsed. Content title"
Code Reproduction URL

https://stackblitz.com/edit/prza28ny-qihwpnvt?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.component.html

Ionic Info

Ionic:

Ionic CLI : 7.2.1
Ionic Framework : @ionic/angular 8.6.4
@angular-devkit/build-angular : 20.1.0
@angular-devkit/schematics : 19.2.15
@angular/cli : 20.1.0
@ionic/angular-toolkit : 12.2.0

Cordova:

Cordova CLI : 12.0.0 ([email protected])
Cordova Platforms : android 14.0.1, ios 7.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, (and 16 other plugins)

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

ios-sim : 8.0.2
NodeJS : v22.17.0
npm : 10.9.2
OS : macOS Unknown
Xcode : Xcode 16.2 Build version 16C5032a

Additional Information

No response

Langage dominant
TypeScript
Étoiles
52.8k
Forks
13.3k
Merge moyen
3 j 1 h
PR mergées (30 j)
86

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de ionic-team/ionic-framework

Toutes les issues de ionic-team/ionic-framework

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.