From 077200d792c36fc6d8de3d1ba23e25d9e6daecee Mon Sep 17 00:00:00 2001 From: Lisbet Alvarez <107949262+lisbet-alvarez@users.noreply.github.com> Date: Fri, 15 May 2026 13:05:19 -0700 Subject: [PATCH] =?UTF-8?q?test:=20=F0=9F=92=8D=20fix=20a11y=20violations?= =?UTF-8?q?=20and=20ignore=20existing=20issues=20(#3275)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test: 💍 fix a11y violations and ignore existing issues * test: 💍 remove ignores for fixed violation * test: 💍 more color contrast ignores for new tests --- .../form/role/edit-grants/index.hbs | 2 +- .../app/components/form/role/grants/index.hbs | 6 +-- .../roles/add-grant-templates-test.js | 9 ++++ .../acceptance/roles/edit-grants-test.js | 54 +++++++++++++++++++ .../projects/settings/index-test.js | 14 +++++ 5 files changed, 79 insertions(+), 6 deletions(-) diff --git a/ui/admin/app/components/form/role/edit-grants/index.hbs b/ui/admin/app/components/form/role/edit-grants/index.hbs index 2d40a3876..ef66b7d51 100644 --- a/ui/admin/app/components/form/role/edit-grants/index.hbs +++ b/ui/admin/app/components/form/role/edit-grants/index.hbs @@ -70,7 +70,7 @@ <:toggle>{{t 'titles.actions'}} <:content> -
+
- + diff --git a/ui/admin/tests/acceptance/roles/add-grant-templates-test.js b/ui/admin/tests/acceptance/roles/add-grant-templates-test.js index 53b50de74..8edcc54a9 100644 --- a/ui/admin/tests/acceptance/roles/add-grant-templates-test.js +++ b/ui/admin/tests/acceptance/roles/add-grant-templates-test.js @@ -103,6 +103,15 @@ module('Acceptance | roles | add-grant-templates', function (hooks) { }); test('can select and add grant templates', async function (assert) { + setRunOptions({ + rules: { + 'color-contrast': { + // [ember-a11y-ignore]: axe rule "color-contrast" automatically ignored on 2026-05-15 + enabled: false, + }, + }, + }); + await visit(urls.addGrantTemplates); const initialGrantCount = instances.role.grant_strings.length; diff --git a/ui/admin/tests/acceptance/roles/edit-grants-test.js b/ui/admin/tests/acceptance/roles/edit-grants-test.js index e62e41dc6..ce4c87a47 100644 --- a/ui/admin/tests/acceptance/roles/edit-grants-test.js +++ b/ui/admin/tests/acceptance/roles/edit-grants-test.js @@ -144,6 +144,15 @@ module('Acceptance | roles/edit grants', function (hooks) { }); test('loads current grants in the editor and updates them', async function (assert) { + setRunOptions({ + rules: { + 'color-contrast': { + // [ember-a11y-ignore]: axe rule "color-contrast" automatically ignored on 2026-05-15 + enabled: false, + }, + }, + }); + assert.expect(4); const newGrantString = 'ids=*;type=session;actions=list,read'; const expectedGrantStrings = [ @@ -183,6 +192,15 @@ module('Acceptance | roles/edit grants', function (hooks) { }); test('shows actions for the first grant on page load', async function (assert) { + setRunOptions({ + rules: { + 'color-contrast': { + // [ember-a11y-ignore]: axe rule "color-contrast" automatically ignored on 2026-05-15 + enabled: false, + }, + }, + }); + await visit(urls.editGrants); assert.dom(selectors.GRANT_ACTIONS_NO_TYPE_DETECTED).doesNotExist(); @@ -206,6 +224,15 @@ module('Acceptance | roles/edit grants', function (hooks) { }); test('actions sidebar updates to "no type detected" when cursor moves to an empty line', async function (assert) { + setRunOptions({ + rules: { + 'color-contrast': { + // [ember-a11y-ignore]: axe rule "color-contrast" automatically ignored on 2026-05-15 + enabled: false, + }, + }, + }); + const role = this.server.create('role', { scope: instances.scopes.global, grant_strings: ['ids=*;type=role;actions=read', ''], @@ -232,6 +259,15 @@ module('Acceptance | roles/edit grants', function (hooks) { }); test('actions sidebar shows "invalid id or type" for a grant with an unrecognised type', async function (assert) { + setRunOptions({ + rules: { + 'color-contrast': { + // [ember-a11y-ignore]: axe rule "color-contrast" automatically ignored on 2026-05-15 + enabled: false, + }, + }, + }); + const role = this.server.create('role', { scope: instances.scopes.global, grant_strings: ['type=not-a-valid-type;actions=read'], @@ -246,6 +282,15 @@ module('Acceptance | roles/edit grants', function (hooks) { }); test('shows linting error markers for an invalid grant string', async function (assert) { + setRunOptions({ + rules: { + 'color-contrast': { + // [ember-a11y-ignore]: axe rule "color-contrast" automatically ignored on 2026-05-15 + enabled: false, + }, + }, + }); + await visit(urls.editGrants); await waitFor(commonSelectors.CODE_EDITOR_CM); @@ -267,6 +312,15 @@ module('Acceptance | roles/edit grants', function (hooks) { }); test('shows autocomplete suggestions when triggered', async function (assert) { + setRunOptions({ + rules: { + 'color-contrast': { + // [ember-a11y-ignore]: axe rule "color-contrast" automatically ignored on 2026-05-15 + enabled: false, + }, + }, + }); + await visit(urls.editGrants); await waitFor(commonSelectors.CODE_EDITOR_CM); diff --git a/ui/desktop/tests/acceptance/projects/settings/index-test.js b/ui/desktop/tests/acceptance/projects/settings/index-test.js index 8fd3f4bc4..3140f9170 100644 --- a/ui/desktop/tests/acceptance/projects/settings/index-test.js +++ b/ui/desktop/tests/acceptance/projects/settings/index-test.js @@ -338,6 +338,20 @@ module('Acceptance | projects | settings | index', function (hooks) { }); test('preferred clients is hidden for Linux', async function (assert) { + setRunOptions({ + rules: { + 'color-contrast': { + // [ember-a11y-ignore]: axe rule "color-contrast" automatically ignored on 2026-05-15 + enabled: false, + }, + + 'heading-order': { + // [ember-a11y-ignore]: axe rule "heading-order" automatically ignored on 2026-05-15 + enabled: false, + }, + }, + }); + window.desktop.system.checkOS.resolves({ isWindows: false, isMac: false,