Skip to content
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

Closed
falconeta opened this issue Jun 21, 2021 · 3 comments · Fixed by #28997
Closed

bug: Screen readers read content behind overlays if is present more than 1 overlay #23472

falconeta opened this issue Jun 21, 2021 · 3 comments · Fixed by #28997
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@falconeta
Copy link

falconeta commented Jun 21, 2021

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:

Ionic:

   Ionic CLI                     : 6.16.1 
   Ionic Framework               : @ionic/angular 5.6.9
   @angular-devkit/build-angular : 0.1100.7
   @angular-devkit/schematics    : 11.0.7
   @angular/cli                  : 11.0.7
   @ionic/angular-toolkit        : 3.1.1

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 9.0.0, ios 5.1.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 5.0.0, (and 41 other plugins)

Utility:

   cordova-res                          : not installed globally
   native-run (update available: 1.4.0) : 1.2.2

System:

   Android SDK Tools : 26.1.1 
   ios-deploy        : 1.10.0
   ios-sim           : 8.0.2
   NodeJS            : v12.19.0 (/usr/local/bin/node)
   npm               : 6.14.13
   OS                : macOS Big Sur
   Xcode             : Xcode 12.5 Build version 12E262
@ionitron-bot ionitron-bot bot added the triage label Jun 21, 2021
@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Jun 21, 2021
@ionitron-bot ionitron-bot bot removed the triage label Jun 21, 2021
@valentirob
Copy link

Issue found also in our project. We had downgraded to ionic version to 5.6.6

@liamdebeasi liamdebeasi added type: bug a confirmed bug report and removed type: bug a confirmed bug report labels Aug 9, 2023
github-merge-queue bot pushed a commit that referenced this issue Feb 9, 2024
…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. -->
@amandaejohnston
Copy link
Contributor

Thank you for the issue! The problem with ion-router-outlet getting aria-hidden removed too early had already been fixed since this issue was posted, but the problem with all overlays being announced by screen readers has now been resolved by #28997. The fix will be available in a future release of Ionic. 👍

Copy link

ionitron-bot bot commented Mar 10, 2024

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Mar 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
4 participants