Skip to content

fix: expose selected state for overlay and font-weight presets - #1808

Open
AFLAHAFI wants to merge 1 commit into
reframe-oss:mainfrom
AFLAHAFI:fix/1769-accessible-preset-buttons
Open

AFLAHAFI wants to merge 1 commit into
reframe-oss:mainfrom
AFLAHAFI:fix/1769-accessible-preset-buttons

Conversation

@AFLAHAFI

Copy link
Copy Markdown

Description

The Image Overlay Position, Size and Opacity presets and Text Controls Font Weight buttons visually indicate the active choice but do not expose it to assistive technology.

This adds dynamic aria-pressed to all 13 buttons using the same selection conditions as their existing styles. Position buttons also receive full accessible names. Preset values, event handlers and appearance are unchanged.

Includes 21 React regression tests covering selection changes, size/opacity boundaries, keyboard activation, image removal and switching text overlays, plus Storybook stories for both components.

Validation:

  • bun run lint — passed.
  • bunx tsc --noEmit — passed.
  • bun run build — passed.
  • bun run build-storybook — passed with bundle-size warnings.
  • bun run test --run src/components/__tests__ with repository dependencies — failed before tests executed because React 19.3.0 and React DOM 19.2.8 do not match.
  • With React temporarily aligned to 19.2.8 in local node_modules only, all 22 component tests passed, including the 21 new regression tests. Those 21 tests failed against the original components. The original local dependency was restored; no dependency or lockfile changes are included.
  • Chromium desktop and mobile viewport checks passed for selection changes, Tab/Space/Enter interaction and accessibility-tree names/pressed states.

Firefox, Safari, physical touch devices, screen-reader speech, video export, the broader test suite and Chromatic were not tested.

AI assistance: OpenAI Codex assisted with investigation, implementation, regression tests, local browser checks, recording and this description. I reviewed the implementation, review report and recording before submission.

Related Issue

Closes #1769

Type of Contribution

  • Bug fix
  • New feature
  • Documentation update
  • Refactor
  • GSSoC contribution

Participant Info

  • GitHub username: AFLAHAFI
  • Contribution level (Beginner/Intermediate/Advanced): Beginner

Screen Recording

How to record: run bun run dev → open http://localhost:3000 → demonstrate the full working flow of your change, including any edge cases.

  • macOS: Cmd + Shift + 5 → Record Selected Portion, or use QuickTime Player
  • Windows: Win + G → Xbox Game Bar → Capture
  • Linux: OBS Studio, GNOME Screenshot tool, or kazam
  • Any OS: Loom (free screen recorder, great for sharing)

Recording / Loom link:

Reframe-1769-Demo.mp4

The recording shows the working controls and keyboard interaction. The demonstration's attribute inspector is not part of the application changes.

Checklist

  • I have read the contribution guidelines
  • My changes follow the project structure
  • I have tested my changes in Chrome, Firefox, and Safari
  • bun run lint passes (no ESLint errors)
  • bunx tsc --noEmit passes (no TypeScript errors)
  • New interactive elements have aria-label / accessible names
  • No console.log statements left in
  • This PR is related to a valid issue
  • Screen recording attached above (required for UI/feature/design changes)

@netlify

netlify Bot commented Oct 10, 2026

Copy link
Copy Markdown

👷 Deploy request for reframe-os pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 3bd62ee

@github-actions

Copy link
Copy Markdown
Contributor

👋 Thanks for your PR, @AFLAHAFI!

Welcome to Reframe — a browser-based video editor built for everyone 🎬

🟠 GSSoC'26 PR detected — thanks for contributing under GirlScript Summer of Code 2026!

What happens next

  1. 🤖 Automated checks — build & TypeScript typecheck will run automatically
  2. ✅ Vercel preview — a preview deployment will be created (requires maintainer authorization for fork PRs)
  3. 👀 Code review — a maintainer will review your changes
  4. 🚀 Merge — once approved, your PR will be merged!

Quick checklist

  • PR title follows Conventional Commits (e.g. feat: add dark mode)
  • Linked the issue this PR closes (e.g. Closes #123)
  • Tested the changes locally (bun run dev)
  • Build passes (bun run build)

Useful links

Happy coding! 🎉

@github-actions

Copy link
Copy Markdown
Contributor

✅ PR Format Check Passed — @AFLAHAFI

Basic format checks passed. A maintainer will review your code changes.

This does not mean the PR is approved — it just means the format is correct.

@github-actions github-actions Bot added level:advanced Advanced level - 55 pts type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature gssoc'26 GirlScript Summer of Code 2026 type:refactor Code refactor type:testing Testing labels Oct 10, 2026
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

👋 This PR has been inactive for 21 days. It will be automatically closed in 14 days if there's no further activity.

If you need help with this PR, please comment or ping a maintainer.
Make sure your branch is rebased onto main and all CI checks pass.

@github-actions github-actions Bot added the needs-fixes PR has issues that need to be fixed label Nov 1, 2026

@chiragjangiir chiragjangiir left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review & Accessibility: Expose selected state for overlay and font-weight presets

Diff Analysis & A11y Review:

  • Accessible State Attributes: In src/components/ImageOverlay.tsx and TextControls.tsx, adding aria-pressed and active styling classes to preset buttons allows assistive technologies to announce the active position (e.g. bottom-right) and font weight.
  • Storybook & Component Isolation: Adding Storybook stories in ImageOverlay.stories.tsx and TextControls.stories.tsx with realistic mock file data (image/png data URI) enables visual regression inspection.
  • Test Suite: New unit tests in src/components/__tests__/PresetButtons.test.tsx verify click handling, selection toggling, and DOM attribute reflection.

Verification Assessment:

  • High-quality accessibility fix with excellent storybook documentation and unit tests.

This branch has not been deployed

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

Labels

gssoc'26 GirlScript Summer of Code 2026 level:advanced Advanced level - 55 pts needs-fixes PR has issues that need to be fixed type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature type:refactor Code refactor type:testing Testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Position/Size/Opacity/Weight preset buttons don't expose selected state to assistive tech

2 participants