Skip to content

test : added accessibility tests for ExportButton component - #11

Open
tmdeveloper007 wants to merge 2 commits into
mainfrom
#8426
Open

tmdeveloper007 wants to merge 2 commits into
mainfrom
#8426

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Owner

Summary of What Has Been Done

Created components/ExportButton.accessibility.test.tsx with comprehensive accessibility tests covering:

  • Trigger button has aria-haspopup="true" indicating it opens a menu
  • Trigger button aria-expanded is false when closed, true when open
  • Dropdown has role="menu"
  • Each format option has role="menuitem"
  • Error message has role="alert" (ARIA live region)
  • Trigger button is focusable
  • Trigger button is keyboard-activatable via Enter and Space keys
  • Export button is disabled while isExporting is true
  • PNG, PDF, and SVG menu items are correctly labeled ("Download PNG/PDF/SVG")
  • Dropdown closes on Escape key press

Mocked useExportImage hook to control isExporting and error states.

Changes Made

  • New file: components/ExportButton.accessibility.test.tsx

Impact it Made

Adds accessibility test coverage for the ExportButton component, ensuring keyboard navigation, ARIA attributes, and screen reader support work correctly.

Closes #8426.

Note: please assign this PR to the tmdeveloper007 account.

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.

1 participant