Skip to content

[MWPW-205938] Add contextual accessible names for Share, Favorite, an… - #313

Open
rea16068 wants to merge 1 commit into
MWPW-205937-analytics-taggingfrom
MWPW-205938-accessible-names
Open

[MWPW-205938] Add contextual accessible names for Share, Favorite, an…#313
rea16068 wants to merge 1 commit into
MWPW-205937-analytics-taggingfrom
MWPW-205938-accessible-names

Conversation

@rea16068

Copy link
Copy Markdown
Collaborator

Fixes MWPW-205938: four session-page controls were missing contextual accessible names per the Stark/Figma annotations, making them indistinguishable to screen-reader users ("Show more", "Show more" repeated with no context).

Changes

  1. Share button: accessible name is now Share ${sessionTitle}, falling back to bare "Share" (no trailing space) if no title.
  2. Favorite button: accessible name is now Favorite ${sessionTitle} (dropped "this session"), set once at construction — does NOT change when toggled, since aria-pressed already conveys on/off state.
  3. Four show-more toggles (speakers, featured products, session resources, description): added a visually-hidden .sr-only span alongside the existing aria-hidden visible label, so screen readers hear "Show more products" / "Show more speakers" / etc., while the visible text stays "Show more"/"Show less" as designed.

Both title-resolving controls use the same logic as the page H1: getMetadata('title') || getMetadata('en-title') — intentionally NOT the event-title metadata used elsewhere for toast copy.

Resolves: MWPW-205938

Built on top of #312 (MWPW-205937)

This PR is based on MWPW-205937-analytics-tagging rather than dev, since it touches the same four toggle files and needs the explicit daa-ll attributes already in place. The sr-only span's textContent change does NOT affect daa-ll — verified both are updated independently in each click handler, and existing daa-ll assertions still pass unchanged.

Out of scope

  • Nothing under event-libs/v1/c2/blocks/sessions-guide/ — it already has its own working accessible names.
  • Playlist/video-player controls — no such block exists in event-libs.

Test plan

  • Unit tests: 134/134 passed on the affected specs
  • JS lint: clean
  • CSS lint: clean (npx stylelint 'event-libs/v1/c2/blocks/event-*/**/*.css')
  • Extended 6 existing spec files per the ticket, including re-verifying MWPW-205937's daa-ll assertions still pass with the sr-only span present.

Merge note: this PR should be merged (or rebased onto dev) after #312 merges first.

@rea16068 rea16068 added this to the 26.37 milestone Aug 31, 2026
@rea16068
rea16068 requested a review from michaelready August 31, 2026 16:50
@aem-code-sync

aem-code-sync Bot commented Aug 31, 2026

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run all PSI checks
  • Re-run failed PSI checks
  • Re-sync branch
Commits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants