question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: a11y - Focus Not Limited Within Modal

See original GitHub issue

Bug Report

Ionic version:

@ionic/angular 5.6.0

Current behavior:

When the modal is open, focus is not limited within modal. Moving focus past the OK button moves focus to back to the top of the page forcing user to navigate through all of the page content again in order to return focus to the modal.

Expected behavior:

Focus remains within modal until modal is closed.

Steps to reproduce:

Take the code from attached link or install .apk provide in attached link, start talk back screen reader open any overlay component from provided .apk, keep navigating with screen reader you will see focus moves on extra 2 div’s only in android devices. This issue occurs because this type of 2 <div> tag are present there in overlay component. & some times the focus moves behind the overlay component.

<div tabindex="0" class="sc-ion-alert-md"></div>

Download .apk here

Related code:

Downlead code here

Other information:

Screen shorts of issues

Ionic info:

Ionic:

   Ionic CLI                     : 6.11.8
   Ionic Framework               : @ionic/angular 5.6.0
   @angular-devkit/build-angular : 0.1101.4
   @angular-devkit/schematics    : 11.1.4
   @angular/cli                  : 11.1.4
   @ionic/angular-toolkit        : 3.1.0

Cordova:

   Cordova CLI       : 10.0.0
   Cordova Platforms : android 9.0.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 4 other plugins)

Utility:

   cordova-res : 0.11.0
   native-run  : 1.0.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gurpreetonebcgcommented, Aug 2, 2021

This issue is only occurring in android devices. when you open any alert or popup box then right swipe you will see focus moves to a rectangular element before reaching to the first element of the popup & when you read whole content of popup then right swipe from the last item of popup, the focus will move again to a rectangular element. Please refer to the attach video. https://drive.google.com/file/d/1WED4jlVcs86bo2yAB5eKZoEqN9RLIdLp/view?usp=sharing

In attached video you will see when popup opens then on right swipe focus moves to right bottom corner in a rectangular box & when you reach to OK button then right swipe focus again move to a rectangular box at the right bottom corner. Please refer to the highlighted areas of attached screen shorts. image image

0reactions
ionitron-bot[bot]commented, Nov 30, 2021

Thanks for the issue! This issue is being closed due to the lack of a reply. 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.

Thank you for using Ionic!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Accessible Modals, Part 1 - Its Issues and the Solutions
This fixes the focus that was left outside of the modal (because you can only have one focus at a time), and it...
Read more >
Focus not moving into modal when open button is ... - GitHub
Describe the bug Using Clarity 2.0 and Angular 8.0, I create a modal window and expect that the focus would be "trapped" in...
Read more >
Add Focus To Pop Up / Modal On Click For Tabbing ...
Ensure that tab order is restricted inside the modal. Ensure that expected keyboard behaviour is implemented, e.g., pressing Escape will ...
Read more >
aria-modal - Accessibility - MDN Web Docs
When a modal element is displayed, focus should be placed in the modal. Focus needs to be "trapped" inside the modal when it...
Read more >
Visa Accessibility - Modal Windows (INT-004)
Confirm that focus is trapped inside all modal windows by cycling through headings, landmark roles, and links with each supported screen reader ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found