Skip to content

docs: fix a11y issues in composition app#683

Merged
fateeand merged 12 commits into
masterfrom
566-fix-a11y-issues-in-composition-app
Jul 1, 2026
Merged

docs: fix a11y issues in composition app#683
fateeand merged 12 commits into
masterfrom
566-fix-a11y-issues-in-composition-app

Conversation

@fateeand

@fateeand fateeand commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Overview

This PR addresses accessibility issues in the Composition app.

Changes

  • Improved responsiveness across all screen sizes, including responsive layouts and a detachable left sidebar.
  • Fixed focus behavior and ensured consistent tab order and visible focus rings.
  • Added semantic landmarks.
  • Resolved color contrast issues on the Colors and Notifications pages.

The PR is marked as a feature because it introduces changes to the getTextColor function in color utils.


Additional info

There is an issue with ArtiomTr/jest-coverage-report-action where it now fails with:

HttpError: Invalid response body while trying to fetch https://api.github.com/repos/AbsaOSS/cps-shared-ui/pulls/<number>: Premature close.

More details can be found here:
ArtiomTr/jest-coverage-report-action#452

As a temporary workaround, continue-on-error: true has been added to the "Comment coverage on PR" step to unblock the pipeline.


Release notes:

  • Fix a11y issues in composition app

@fateeand fateeand requested a review from korel-san as a code owner June 26, 2026 13:45
Copilot AI review requested due to automatic review settings June 26, 2026 13:45
@fateeand fateeand added the skip-release-notes No release notes required label Jun 26, 2026
@fateeand fateeand linked an issue Jun 26, 2026 that may be closed by this pull request
@fateeand fateeand removed the skip-release-notes No release notes required label Jun 26, 2026
@fateeand fateeand changed the title chore: fix a11y issues in composition app feat: fix a11y issues in composition app Jun 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 targets accessibility improvements in the Composition app by improving responsive layout behavior (notably the navigation sidebar), strengthening keyboard focus management, and improving semantics/contrast across documentation and demo pages.

Changes:

  • Implemented a mobile-aware, collapsible navigation sidebar with focus-management behaviors (Escape handling, active-link focus, and post-navigation focus).
  • Improved semantic HTML landmarks/structure (e.g., header/main usage and proper table header markup with scope="col").
  • Updated styling for responsiveness and consistency (px → rem conversions, wrapping layouts, overflow handling), and improved color/contrast logic (e.g., text-on-background selection).

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
projects/cps-ui-kit/src/lib/utils/colors-utils.ts Updates text color selection logic using relative luminance for better contrast decisions.
projects/composition/tsconfig.json Excludes spec files from this tsconfig’s compilation scope.
projects/composition/src/variables.scss Converts key layout variables to rem units.
projects/composition/src/styles.scss Rem-based spacing updates and adds a small-screen padding adjustment.
projects/composition/src/app/pages/tree-table-page/tree-table-page.component.scss Rem-based spacing adjustment.
projects/composition/src/app/pages/tooltip-page/tooltip-page.component.scss Improves layout responsiveness (wrapping + gaps) for tooltip examples.
projects/composition/src/app/pages/tooltip-page/tooltip-page.component.html Reorders markup to match the updated responsive layout groups.
projects/composition/src/app/pages/table-page/table-page.component.scss Rem-based spacing adjustment.
projects/composition/src/app/pages/sidebar-menu-page/sidebar-menu-page.component.ts Adds icon support for the updated info-card UI.
projects/composition/src/app/pages/sidebar-menu-page/sidebar-menu-page.component.scss Replaces plain text with an “info card” style treatment and adjusts layout.
projects/composition/src/app/pages/sidebar-menu-page/sidebar-menu-page.component.html Replaces span description with a semantic/info-card block including an icon.
projects/composition/src/app/pages/notification-page/notification-page.component.html Adjusts notification buttons (icons + color changes) to address contrast/visual issues.
projects/composition/src/app/pages/loader-page/loader-page.component.scss Ensures loader container can shrink to viewport width.
projects/composition/src/app/pages/expansion-panel-page/expansion-panel-page.component.scss Prevents overly narrow layout by enforcing min-width: max-content.
projects/composition/src/app/pages/colors-page/colors-page/colors-page.component.scss Rem-based conversions and breakpoint normalization for responsive layout.
projects/composition/src/app/pages/button-page/button-page.component.scss Allows wrapping + adds gaps for responsive button rows.
projects/composition/src/app/components/theme-toggle/theme-toggle.component.scss Rem-based sizing and replaces outline styling with shared focus-ring() mixin.
projects/composition/src/app/components/shared/api-type/api-type.component.scss Adds focus-visible styling using shared focus-ring() mixin.
projects/composition/src/app/components/service-docs-viewer/service-docs-viewer.component.scss Rem-based spacing tweaks.
projects/composition/src/app/components/service-docs-viewer/service-docs-viewer.component.html Fixes table semantics by adding <tr> in <thead> and scope="col" on headers.
projects/composition/src/app/components/navigation-sidebar/navigation-sidebar.component.ts Adds link-click eventing and active-link focus helper for keyboard UX.
projects/composition/src/app/components/navigation-sidebar/navigation-sidebar.component.spec.ts Adds unit tests covering inert behavior, filtering, click behavior, and focusActiveLink().
projects/composition/src/app/components/navigation-sidebar/navigation-sidebar.component.scss Adds focus-visible ring, mobile fixed positioning, and rem-based conversions.
projects/composition/src/app/components/navigation-sidebar/navigation-sidebar.component.html Wraps nav in a semantic landmark, uses inert when collapsed, and emits link-click events.
projects/composition/src/app/components/component-docs-viewer/component-docs-viewer.component.html Improves table semantics with <tr> in <thead> and scope="col" on headers.
projects/composition/src/app/components/code-example/code-example.component.scss Rem-based updates and adds horizontal overflow handling for previews.
projects/composition/src/app/app.component.ts Adds mobile breakpoint handling, Escape-to-close, focus management, and sidebar interaction wiring.
projects/composition/src/app/app.component.spec.ts Expands unit tests for mobile/desktop behavior, navigation focus, Escape handling, and sidebar toggling.
projects/composition/src/app/app.component.scss Adds mobile sidebar/backdrop/toggle styling and layout updates.
projects/composition/src/app/app.component.html Introduces semantic <header>/<main>, adds sidebar toggle button + backdrop, and hooks focus behavior.

Comment thread projects/composition/src/app/app.component.scss
Comment thread projects/composition/src/app/app.component.scss Outdated
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Playwright test results

passed  110 passed

Details

stats  110 tests across 4 suites
duration  4 minutes
commit  469c595
info  For details, download the Playwright report

@lukasmatta lukasmatta left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice work! What do you think about adding PW accessibility tests for the composition app to prevent any future a11y regressions?

@lukasmatta

Copy link
Copy Markdown
Collaborator

The PR is marked as a feature because it introduces changes to the getTextColor function in color utils.

release-please supports multiple feats/fixes within one PR (squash commit). I suggest changing the title to docs: fix a11y issues in composition app - composition app is essentially a documentation and does not affect library consumers directly. Then we can also add something like feat: improve getTextColor function to squash commit footer when merging the PR

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Coverage report for library

St.
Category Percentage Covered / Total
🟡 Statements 63.43% 5029/7928
🔴 Branches 55.47% 2215/3993
🟡 Functions 63.11% 951/1507
🟡 Lines 64.37% 4695/7294

Test suite run success

1931 tests passing in 54 suites.

Report generated by 🧪jest coverage report action from 469c595

@fateeand fateeand changed the title feat: fix a11y issues in composition app docs: fix a11y issues in composition app Jul 1, 2026
@fateeand

fateeand commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

Nice work! What do you think about adding PW accessibility tests for the composition app to prevent any future a11y regressions?

Yes, I created a follow-up work item #685

@fateeand fateeand merged commit 7010448 into master Jul 1, 2026
12 checks passed
@fateeand fateeand deleted the 566-fix-a11y-issues-in-composition-app branch July 1, 2026 14: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 composition app

3 participants