Skip to content

Commit cbc7323

Browse files
committed
docs(header): add comment
1 parent 2837790 commit cbc7323

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,15 @@ export const setHeaderActive = (headerIndex: HeaderIndex, active = true) => {
181181
} else {
182182
headerEl.classList.add('header-collapse-condense-inactive');
183183

184+
/**
185+
* The small title should only be accessed by screen readers
186+
* when the large title collapses into the small title due
187+
* to scrolling.
188+
*
189+
* Originally, the header was given `aria-hidden="true"`
190+
* but this caused issues with screen readers not being
191+
* able to access any focusable elements within the header.
192+
*/
184193
ionTitles.forEach((ionTitle) => {
185194
if (ionTitle) {
186195
ionTitle.setAttribute('aria-hidden', 'true');

0 commit comments

Comments
 (0)