-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Screen readers read content behind overlays if is present more than 1 overlay #23472
Comments
Issue found also in our project. We had downgraded to ionic version to 5.6.6 |
…n readers (#28997) Issue number: resolves #23472 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> If multiple overlays are presented at the same time, none of them receive `aria-hidden="true"`. This means that screen readers can read contents from overlays behind the current one, which can be confusing for users. The original issue also reports router outlets getting `aria-hidden` removed when any overlay is dismissed, not just the last one, but we've since fixed that: https://github.com/ionic-team/ionic-framework/blob/35ab6b4816bd627239de8d8b25ce0c86db8c74b4/core/src/utils/overlays.ts#L573-L576 ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> All overlays besides the topmost one now receive `aria-hidden="true"`. This means that screen readers will only announce the topmost overlay. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
Thank you for the issue! The problem with |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Bug Report
Ionic version:
[ ] 4.x
[x] 5.x
Current behavior:
Screen readers read content behind overlays if is present more than 1 overlay and, after closing the last overlay, the aria-hidden applied on the ion-router-outlet component is removed despite the first modal is already present.
Expected behavior:
if I open another overlay (inside an overlay for example) the screen reader doesn't have to read the hidden overlay and if I close the second overlay, the ion-router-outlet component must have the attribute aria-hidden if an overlay is present
Steps to reproduce:
open first overlay -> open second overlay from first overlay
A sample application via GitHub
https://stackblitz.com/edit/ionic-bug-overlays
Ionic info:
The text was updated successfully, but these errors were encountered: