Skip to content

Conversation

@LukasHirt
Copy link
Collaborator

@LukasHirt LukasHirt commented Nov 5, 2025

Description

Setup new Playwright a11y tests and add a11y reporter. Accessibility checks are added into existing E2E tests. Docs are added to explain the new accessibility tests.

Motivation and Context

Migrating tests from cucumber to playwright.

How Has This Been Tested?

  • test environment: macos
  • test case 1: run playwright tests
  • test case 2: run cucumber tests
  • test case 3: let CI pass

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests
  • Documentation
  • Maintenance (e.g. dependency updates or tooling)

@LukasHirt LukasHirt self-assigned this Nov 5, 2025
@LukasHirt LukasHirt force-pushed the test/a11y-tests branch 4 times, most recently from e5f3541 to 1aae2c5 Compare November 10, 2025 09:55
Setup new Playwright a11y tests and add a11y reporter.
Accessibility checks are added into existing E2E tests.
Docs are added to explain the new accessibility tests.
@sonarqubecloud
Copy link

@LukasHirt
Copy link
Collaborator Author

@mzner please review the vue changes.

@LukasHirt LukasHirt marked this pull request as ready for review November 10, 2025 10:34
v-bind="componentProps"
:class="[action.class, 'action-menu-item', 'oc-py-s', 'oc-px-m', 'oc-width-1-1']"
:aria-label="componentProps.disabled ? action.disabledTooltip?.(actionOptions) : ''"
:aria-label="componentProps.disabled ? action.disabledTooltip?.(actionOptions) : null"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we be using a label instead of null?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We need the label to be gone if the button is not disabled and with '' it is unfortunately persisted on the element (even though with no value). Using null makes sure that the label is gone.

<template>
<li v-oc-tooltip="componentProps.disabled ? action.disabledTooltip?.(actionOptions) : ''">
<oc-button
v-oc-tooltip="showTooltip || action.hideLabel ? action.label(actionOptions) : ''"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a difference between this and :title?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

tooltip is not available to screen readers.

this.outputFile = options.outputFile || 'a11y-report.json'
}

onBegin(_config: FullConfig, _suite: Suite): void {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not that important, but what do you think about using onStart instead of onBegin?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We cannot use arbitrary name here because these methods are overwriting the ones from the reporter class.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

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.

4 participants