Skip to content

Commit 9d90e1c

Browse files
committed
refactor(menu, overlays): update comments and add if
1 parent c10776b commit 9d90e1c

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

core/src/components/menu/menu.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,9 @@ export class Menu implements ComponentInterface, MenuI {
712712
* transition to prevent this. Once the transition is complete, the menu
713713
* is shown again.
714714
*/
715-
this.el.removeAttribute('aria-hidden');
715+
if (isPlatform('android')) {
716+
this.el.removeAttribute('aria-hidden');
717+
}
716718

717719
// emit open event
718720
this.ionDidOpen.emit();

core/src/utils/overlays.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -971,11 +971,12 @@ export const createTriggerController = () => {
971971
* like TalkBack do not announce or interact with the content until the
972972
* animation is complete, avoiding confusion for users.
973973
*
974-
* If the overlay is being presented, it prevents focus rings from appearing
975-
* in incorrect positions due to the transition (specifically `transform`
976-
* styles), ensuring that when aria-hidden is removed, the focus rings are
977-
* correctly displayed in the final location of the elements. This only
978-
* applies to Android devices.
974+
* When the overlay is presented on an Android device, TalkBack's focus rings
975+
* may appear in the wrong position due to the transition (specifically
976+
* `transform` styles). This occurs because the focus rings are initially
977+
* displayed at the starting position of the elements before the transition
978+
* begins. This workaround ensures the focus rings do not appear in the
979+
* incorrect location.
979980
*
980981
* If this solution is applied to iOS devices, then it leads to a bug where
981982
* the overlays cannot be accessed by screen readers. This is due to

0 commit comments

Comments
 (0)