Skip to content

Add accessibility in video background settings component [WPB-24448]#21351

Open
zskhan wants to merge 1 commit into
devfrom
feat/background-effect-settings-accessibility
Open

Add accessibility in video background settings component [WPB-24448]#21351
zskhan wants to merge 1 commit into
devfrom
feat/background-effect-settings-accessibility

Conversation

@zskhan
Copy link
Copy Markdown
Contributor

@zskhan zskhan commented May 19, 2026

StoryWPB-24448 Accessibility feature for the Blur Background

Add accessibility in video background settings component also improve focus management and few styling glitches

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

🔗 Download Full Report Artifact

🧪 Playwright Test Summary

  • Passed: 15
  • Failed: 0
  • Skipped: 0
  • 🔁 Flaky: 0
  • 📊 Total: 15
  • Total Runtime: 117.7s (~ 1 min 58 sec)

@zskhan zskhan enabled auto-merge May 19, 2026 20:24
@zskhan zskhan added this pull request to the merge queue May 19, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 19, 2026
@zskhan zskhan added this pull request to the merge queue May 19, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 19, 2026
return true;
};

const getBackgroundEffectLabel = (effect: BackgroundEffectSelection, backgrounds: BuiltinBackground[]): string => {
Copy link
Copy Markdown
Member

@screendriver screendriver May 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BackgroundEffectSelection looks like a discriminated union. Could we make this mapping exhaustive? (pattern matching for example)

That would fail at compile time when a new effect type is added, rather than silently falling back.

const background = backgrounds.find(({id}) => id === effect.backgroundId);
return background ? t(background.labelKey) : t('videoCallBackgroundVirtual');
}
default:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we avoid this default branch and use an exhaustive check instead? The fallback may hide missing cases if the union grows.

css={tileButtonStyles}
data-selected={selected}
aria-pressed={selected}
role="radio"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this element is role="radio" can we align the parent container to role="radiogroup" semantics?

<h3 id={blurSectionId} css={sectionLabelStyles}>
{t('videoCallBackgroundBlurSectionLabel')}
</h3>
<div css={tileGridStyles} role="group" aria-labelledby={blurSectionId}>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This group contains radio options. Should this be role="radiogroup"?

<h3 id={virtualSectionId} css={sectionLabelStyles}>
{t('videoCallBackgroundVirtualSectionLabel')}
</h3>
<div css={tileGridStyles} role="group" aria-labelledby={virtualSectionId}>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question as above: because children are role="radio" I think role="radiogroup" would be the semantically correct container role here.

const virtualSectionId = useId();
const closeButtonRef = useRef<HTMLButtonElement>(null);

useEffect(() => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test for this autofocus behavior?

return;
}

if (!isTabKey(event)) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now intercept only Tab but there is a test missing for this behavior change.

Comment thread apps/webapp/src/script/components/calling/FullscreenVideoCall.tsx
@zskhan zskhan force-pushed the feat/background-effect-settings-accessibility branch from d2d4c31 to 8b051ea Compare May 20, 2026 08:09
@sonarqubecloud
Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants