Skip to content

Adding accesibility tests and cleaning up files#22

Merged
MichielDean merged 1 commit into
mainfrom
accesibility
Jun 11, 2025
Merged

Adding accesibility tests and cleaning up files#22
MichielDean merged 1 commit into
mainfrom
accesibility

Conversation

@MichielDean
Copy link
Copy Markdown
Owner

@MichielDean MichielDean commented Jun 11, 2025

This pull request introduces a variety of changes across the codebase, focusing on accessibility enhancements, code cleanup, and styling improvements. Additionally, it includes updates to ESLint configuration and dependencies, as well as the addition of new types for API responses. Below is a summary of the most important changes grouped by theme:

Accessibility Enhancements:

  • src/components/Header.tsx: Added a "Skip to main content" link for keyboard navigation and updated navigation links with aria-label and aria-current attributes for improved accessibility.
  • src/pages/admin/users.tsx: Added accessibility features such as aria-live for loading states, scope="col" for table headers, and aria-label and aria-describedby for user role buttons in the User Management page. [1] [2] [3]

Code Cleanup:

Styling Improvements:

ESLint and Dependency Updates:

  • .eslintrc.json: Added overrides to disable specific ESLint rules for test files.
  • package.json: Added axe-playwright dependency for automated accessibility testing.

API Response Types:

Copilot AI review requested due to automatic review settings June 11, 2025 02:18
@MichielDean MichielDean enabled auto-merge (squash) June 11, 2025 02:18
@MichielDean MichielDean changed the title Adding accesibility tests and clening up files Adding accesibility tests and cleaning up files Jun 11, 2025
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 introduces several improvements to enhance accessibility across pages and components, while also cleaning up obsolete comments, refining styling, and updating configuration and API types.

  • Accessibility enhancements including skip navigation links, proper aria attributes for dynamic content and interactive elements
  • Code cleanup through removal of outdated comments and debug logging
  • Styling improvements with updated color schemes and CSS module integration, plus ESLint and dependency updates

Reviewed Changes

Copilot reviewed 46 out of 46 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/utils/updateKeycloakJson.ts Removed outdated file-level comment
src/utils/keycloakTokenManager.ts Removed outdated file-level comment
src/utils/keycloakAdminApi.ts Removed outdated file-level comment
src/styles/Dashboard.module.css Updated colors for visual consistency
src/pages/unauthorized.tsx Added accessibility improvements (e.g., main-content id, aria)
src/pages/test-results-dashboard.tsx Enhanced accessibility via ARIA roles, labels and improved focus
src/pages/simple-test-dashboard.tsx Added main-content id for accessibility
src/pages/register.tsx Added accessibility attributes for registration page elements
src/pages/profile.tsx Added main-content id for accessibility
src/pages/login.tsx Improved accessibility and form element properties
src/pages/dashboard.tsx Enhanced navigation, content editing controls, and accessibility
src/pages/api/analytics/error-analysis.ts Standardized API response types with added type annotations
src/pages/admin/users.tsx Improved accessibility in user management table structure
src/config/keycloak.ts Removed outdated file-level comment
src/components/charts/TestTrendsChart.tsx Refactored chart styling using a CSS module
src/components/Header.tsx Added skip navigation link and improved header navigation accessibility
src/auth/apiAuth.ts Removed excessive debug logging
src/auth/KeycloakProvider.tsx Removed a redundant comment
package.json Added axe-playwright dependency for accessibility testing
.eslintrc.json Updated ESLint overrides for test files
Comments suppressed due to low confidence (2)

src/pages/test-results-dashboard.tsx:554

  • Consider if making table rows focusable (using tabIndex) may conflict with standard table navigation patterns; verify that this focus management approach is aligned with intended user experience.
<tr key={report._id} tabIndex={0} aria-rowindex={index + 2} aria-label={`Test report for ${report.results.tool.name}, ${successRate}% success rate`}>

src/components/Header.tsx:14

  • [nitpick] Consider moving the inline styles for the skip navigation link into a CSS module or dedicated stylesheet for improved maintainability and consistency.
<a href="#main-content" className="skip-link" style={{ position: 'absolute', left: '-9999px', zIndex: 999, padding: '8px 16px', background: '#000', color: '#fff', textDecoration: 'none', borderRadius: '0 0 4px 0' }} onFocus={...} onBlur={...}>

@MichielDean MichielDean merged commit a8f1374 into main Jun 11, 2025
4 checks passed
@MichielDean MichielDean deleted the accesibility branch June 11, 2025 02:23
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.

2 participants