Skip to content

Commit e0908a1

Browse files
Fix lower-sticky-note accessibility for screen readers
Resolves CORE-1490 This commit addresses critical accessibility issues in the lower-sticky-note component that prevented screen reader users from accessing the donation banner content. Changes made: 1. Added ARIA live region attributes (aria-live="polite" and aria-atomic="true") to the container div to ensure screen readers announce the dynamically loaded content when it appears on the page. 2. Changed role from "dialog" to "complementary" since this is a non-modal notification banner that doesn't trap focus. 3. Updated aria-label from generic "sticky note" to descriptive "Donation campaign announcement" to better convey the purpose to screen reader users. 4. Added aria-hidden="true" to all FontAwesome icon components to prevent screen readers from announcing icon content alongside button labels. Files modified: - src/app/layouts/default/lower-sticky-note/lsn-content.tsx - src/app/components/put-away/put-away.tsx Testing: This fix should be tested with NVDA/JAWS (Windows) and VoiceOver (macOS) to verify that the banner content is announced when it appears and that all interactive elements (dismiss button and donation link) are accessible and operable with screen readers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1 parent 0c51fa5 commit e0908a1

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/app/components/put-away/put-away.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default function PutAway(
2626
onKeyDown={closeUsingKeyboard}
2727
data-nudge-action='dismissed'
2828
>
29-
<FontAwesomeIcon icon={faTimes} />
29+
<FontAwesomeIcon icon={faTimes} aria-hidden="true" />
3030
</span>
3131
);
3232
}

src/app/layouts/default/lower-sticky-note/lsn-content.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function NoteWithImage({bannerInfo}: {bannerInfo: BannerInfo}) {
3333
<RawHTML className="blurb" html={bannerInfo.html_message} />
3434
<a className="cta" href={bannerInfo.link_url} data-nudge-action="interacted">
3535
{bannerInfo.link_text}
36-
<FontAwesomeIcon icon={faChevronRight} />
36+
<FontAwesomeIcon icon={faChevronRight} aria-hidden="true" />
3737
</a>
3838
</div>
3939
</NoteContainer>
@@ -45,9 +45,9 @@ function NoteWithoutImage({bannerInfo}: {bannerInfo: BannerInfo}) {
4545
<NoteContainer withImage={false}>
4646
<RawHTML className="blurb" html={bannerInfo.html_message} />
4747
<a className="cta" href={bannerInfo.link_url} data-nudge-action="interacted">
48-
<FontAwesomeIcon icon={faHeart} className="red-heart" />
48+
<FontAwesomeIcon icon={faHeart} className="red-heart" aria-hidden="true" />
4949
{bannerInfo.link_text}
50-
<FontAwesomeIcon icon={faChevronRight} />
50+
<FontAwesomeIcon icon={faChevronRight} aria-hidden="true" />
5151
</a>
5252
</NoteContainer>
5353
);
@@ -68,8 +68,10 @@ export default function LowerStickyNote({stickyData, PutAway}: {
6868
data-analytics-view
6969
data-analytics-nudge="donate"
7070
data-nudge-placement="banner"
71-
role="dialog"
72-
aria-label="sticky note"
71+
role="complementary"
72+
aria-label="Donation campaign announcement"
73+
aria-live="polite"
74+
aria-atomic="true"
7375
>
7476
<PutAway />
7577
{

0 commit comments

Comments
 (0)