test: 💍 fix a11y violations and ignore existing issues (#3275)

* test: 💍 fix a11y violations and ignore existing issues

* test: 💍 remove ignores for fixed violation

* test: 💍 more color contrast ignores for new tests
This commit is contained in:
Lisbet Alvarez authored and GitHub committed 2026-05-15 13:05:19 -07:00
1 parent f34a1df298
commit 077200d792
5 files changed
+79 -6

No files matched your search

@@ -70,7 +70,7 @@
<A.Item @isOpen={{true}} @isStatic={{true}} data-test-grant-actions>
<:toggle>{{t 'titles.actions'}}</:toggle>
<:content>
<div class='grant-actions-scroll-container'>
<div class='grant-actions-scroll-container' tabindex='0'>
<GrantActions
@grantsSchema={{@grantsSchema}}
@grantString={{this.currentLineText}}
@@ -5,11 +5,7 @@
<Hds::Layout::Flex as |F|>
<F.Item @basis='66%'>
<Hds::CodeBlock
class='grant-codeblock'
@ariaLabel={{t 'resources.role.grant-templates.titles.grant-strings'}}
@value={{this.grants}}
/>
<Hds::CodeBlock class='grant-codeblock' @value={{this.grants}} />
</F.Item>
</Hds::Layout::Flex>
@@ -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;
@@ -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);
@@ -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,