Skip to content

Fix a11y issues in file upload component#547

Merged
fateeand merged 7 commits intomasterfrom
545-fix-a11y-issues-in-file-upload-component
Apr 24, 2026
Merged

Fix a11y issues in file upload component#547
fateeand merged 7 commits intomasterfrom
545-fix-a11y-issues-in-file-upload-component

Conversation

@fateeand
Copy link
Copy Markdown
Collaborator

Fixing accessibility issues in file upload component

Validation rules:

Validated using Playwright accessibility tests, Lighthouse tool, axe DevTools extension, Accessibility Insights for Web extension, and manual checks including keyboard tab navigation and screen reader testing.

Full doc with rules


Playwright axe-core validation results:

State before:

Component button-name color-contrast label
File upload -

State after:

Component button-name color-contrast label
File upload -

Checklist

  • Keyboard Navigation
    All interactive elements are fully operable via keyboard only, including buttons, inputs, menus, dialogs, sliders, drag-and-drop, tree views, multi-selects, and composite widgets. No traps or dead ends.

  • Focus Management
    Focus is visible, logical, moves in predictable order, trapped where necessary (modals/popovers), and restored after closing. Focus is perceivable in all interactive widgets.

  • Semantics / ARIA

    • Semantic HTML is used correctly.
    • ARIA roles, states, and properties are applied only when needed.
    • All form fields, tables, and widgets (including autocomplete, tree selects, tree tables, drag-and-drop, sliders, and multi-selects) are properly labeled and accessible.
  • Color / Contrast

    • Text and interactive elements meet contrast requirements (≥4.5:1 normal text, ≥3:1 large text).
    • Focus and selection indicators are visually perceivable.
    • Color is not the only indicator of state.
  • Screen Reader / Assistive Technology

    • All content, labels, and dynamic updates are perceivable via screen readers.
    • Live regions announce status messages, alerts, modals, notifications, and dynamic changes.
    • Interactive widgets provide proper announcements of selection and updates.
  • Responsive & Zoom

    • Components function correctly and remain readable at all viewport sizes and up to 200% zoom, including mobile and touch devices.
    • Prefer em/rem units over px where scaling is required.
  • Error Handling

    • Errors are clearly identified visually and programmatically.
    • Form inputs use aria-describedby or aria-invalid for inline messages.
    • Instructions and suggestions are accessible.
  • Dynamic Content / Updates

    • Status updates, alerts, notifications, and modals use live regions.
    • Updates do not disrupt focus or user control unexpectedly.
  • Interaction Feedback / States

    • All interactive states (hover, focus, active, disabled, drag-and-drop, reordering, multi-select) are visually perceivable.
  • [N/A] Authentication & Sensitive Actions

    • Inputs and actions involving sensitive data provide accessible instructions, feedback, and error messages.
  • Predictable & Controllable UI

    • Components behave consistently and predictably.
    • Popups, modals, autocomplete suggestions, drag-and-drop, and dynamic content allow user control.

Release notes:

  • Fix a11y issues in file upload component

@fateeand fateeand requested a review from korel-san as a code owner April 24, 2026 07:11
Copilot AI review requested due to automatic review settings April 24, 2026 07:11
@fateeand fateeand linked an issue Apr 24, 2026 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 24, 2026

Coverage report for library

St.
Category Percentage Covered / Total
🔴 Statements 30.51% 2010/6587
🔴 Branches 24.6% 733/2980
🔴 Functions 26.2% 372/1420
🔴 Lines 31.33% 1898/6058

Test suite run success

453 tests passing in 22 suites.

Report generated by 🧪jest coverage report action from 33f9f83

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 24, 2026

Playwright test results

passed  48 passed

Details

stats  48 tests across 4 suites
duration  1 minute, 14 seconds
commit  33f9f83
info  For details, download the Playwright report

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses accessibility gaps in the cps-file-upload component by improving its accessible name/disabled behavior, adding clearer processing/error UX, and enabling automated a11y scanning for the component page.

Changes:

  • Adds accessibility and UX enhancements to cps-file-upload (aria label, disabled state, keyboard interactions, error feedback, processing lifecycle events).
  • Updates styling for clearer focus/disabled/error states and rem-based sizing.
  • Enables Playwright axe scans for the file upload page and updates composition examples/docs data accordingly.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
projects/cps-ui-kit/src/lib/components/cps-progress-linear/cps-progress-linear.component.ts Recomputes resolved colors on input changes for dynamic theme/token updates.
projects/cps-ui-kit/src/lib/components/cps-file-upload/cps-file-upload.component.ts Adds new inputs/outputs and drag/drop + processing/error state handling.
projects/cps-ui-kit/src/lib/components/cps-file-upload/cps-file-upload.component.html Improves semantics (button), live announcements, disabled/processing UI, and keyboard removal action.
projects/cps-ui-kit/src/lib/components/cps-file-upload/cps-file-upload.component.scss Adds focus ring, disabled/error styling, and rem-based sizing updates.
projects/composition/src/app/pages/file-upload-page/file-upload-page.component.ts Updates demo logic to exercise new events, disable toggling, and state reset on extension changes.
projects/composition/src/app/pages/file-upload-page/file-upload-page.component.scss Adds layout styling for the new demo sections.
projects/composition/src/app/pages/file-upload-page/file-upload-page.component.html Expands examples to include aria label, disabled state, and processing events; updates sizing units.
projects/composition/src/app/pages/divider-page/divider-page.component.scss Aligns section title color with updated design token usage.
projects/composition/src/app/api-data/cps-file-upload.json Documents new ariaLabel, disabled, fileProcessed, and fileProcessingFailed API surface.
playwright/cps-accessibility.spec.ts Enables axe scanning for the file upload route/component.

Copy link
Copy Markdown
Collaborator

@lukasmatta lukasmatta left a comment

Choose a reason for hiding this comment

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

great job!

@fateeand fateeand merged commit 91c1bab into master Apr 24, 2026
10 checks passed
@fateeand fateeand deleted the 545-fix-a11y-issues-in-file-upload-component branch April 24, 2026 12:20
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.

Fix a11y issues in file upload component

3 participants