Skip to content

Commit 4f407ca

Browse files
fix(tab-bar): add aria-hidden for hiding on scroll
1 parent 11ea3b3 commit 4f407ca

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

core/src/components/header/header.utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { readTask, writeTask } from '@stencil/core';
22
import { clamp } from '@utils/helpers';
3+
34
import { getIonMode } from '../../global/ionic-global';
45

56
const TRANSITION = 'all 0.2s ease-in-out';

core/src/components/tab-bar/tab-bar.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,10 @@ export class TabBar implements ComponentInterface {
228228

229229
if (hidden) {
230230
this.el.setAttribute('inert', '');
231+
this.el.setAttribute('aria-hidden', 'true');
231232
} else {
232233
this.el.removeAttribute('inert');
234+
this.el.removeAttribute('aria-hidden');
233235
}
234236

235237
if (this.contentEl) {
@@ -256,6 +258,9 @@ export class TabBar implements ComponentInterface {
256258

257259
this.el.style.removeProperty('--internal-tab-bar-hide-height');
258260
if (this.isHidden) {
261+
this.el.classList.remove('tab-bar-scroll-hidden');
262+
this.el.removeAttribute('inert');
263+
this.el.removeAttribute('aria-hidden');
259264
this.isHidden = false;
260265
}
261266
}

0 commit comments

Comments
 (0)